From 0004cfb35aca3a4f438893081ad3025526f1dcf7 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Wed, 29 Jul 2020 20:43:08 +0100 Subject: [PATCH] Change symbol names e.g. RSS > GS-1 DataBar Preserves old names in zint.h to retain backwards compatability. --- backend/code128.c | 4 +- backend/common.c | 2 +- backend/composite.c | 52 ++-- backend/library.c | 98 ++++---- backend/output.c | 32 +-- backend/rss.c | 34 +-- backend/tests/test_2of5.c | 10 +- backend/tests/test_code128.c | 74 +++--- backend/tests/test_composite.c | 90 +++---- backend/tests/test_eci.c | 8 +- backend/tests/test_gs1.c | 56 ++--- backend/tests/test_imail.c | 8 +- backend/tests/test_library.c | 8 +- backend/tests/test_raster.c | 32 +-- backend/tests/test_rss.c | 418 ++++++++++++++++----------------- backend/tests/test_vector.c | 38 +-- backend/tests/testcommon.c | 70 +++--- backend/zint.h | 48 ++-- backend_tcl/zint.c | 32 +-- docs/manual.txt | 51 ++-- frontend_qt/mainwindow.cpp | 54 ++--- 21 files changed, 620 insertions(+), 599 deletions(-) diff --git a/backend/code128.c b/backend/code128.c index 96fd272e..a460de99 100644 --- a/backend/code128.c +++ b/backend/code128.c @@ -725,7 +725,7 @@ INTERNAL int ean_128(struct zint_symbol *symbol, unsigned char source[], const s } /* if part of a composite symbol make room for the separator pattern */ - if (symbol->symbology == BARCODE_EAN128_CC) { + if (symbol->symbology == BARCODE_GS1_128_CC) { separator_row = symbol->rows; symbol->row_height[symbol->rows] = 1; symbol->rows += 1; @@ -998,7 +998,7 @@ INTERNAL int ean_128(struct zint_symbol *symbol, unsigned char source[], const s expand(symbol, dest); /* Add the separator pattern for composite symbols */ - if (symbol->symbology == BARCODE_EAN128_CC) { + if (symbol->symbology == BARCODE_GS1_128_CC) { for (i = 0; i < symbol->width; i++) { if (!(module_is_set(symbol, separator_row + 1, i))) { set_module(symbol, separator_row, i); diff --git a/backend/common.c b/backend/common.c index 87ca6649..1627b212 100644 --- a/backend/common.c +++ b/backend/common.c @@ -241,7 +241,7 @@ INTERNAL int is_extendable(const int symbology) { /* Indicates which symbols can have composite 2D component data */ INTERNAL int is_composite(int symbology) { - return symbology >= BARCODE_EANX_CC && symbology <= BARCODE_RSS_EXPSTACK_CC; + return symbology >= BARCODE_EANX_CC && symbology <= BARCODE_DBAR_EXPSTK_CC; } INTERNAL int istwodigits(const unsigned char source[], const int length, const int position) { diff --git a/backend/composite.c b/backend/composite.c index 8eb7d8b1..6ae47e6c 100644 --- a/backend/composite.c +++ b/backend/composite.c @@ -1355,7 +1355,7 @@ static int linear_dummy_run(unsigned char *source, int length) { int linear_width; dummy = ZBarcode_Create(); - dummy->symbology = BARCODE_EAN128_CC; + dummy->symbology = BARCODE_GS1_128_CC; dummy->option_1 = 3; error_number = ean_128(dummy, source, length); linear_width = dummy->width; @@ -1396,13 +1396,13 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l } cc_mode = symbol->option_1; - if ((cc_mode == 3) && (symbol->symbology != BARCODE_EAN128_CC)) { + if ((cc_mode == 3) && (symbol->symbology != BARCODE_GS1_128_CC)) { /* CC-C can only be used with a GS1-128 linear part */ strcpy(symbol->errtxt, "447: Invalid mode (CC-C only valid with GS1-128 linear component)"); return ZINT_ERROR_INVALID_OPTION; } - if (symbol->symbology == BARCODE_EAN128_CC) { + if (symbol->symbology == BARCODE_GS1_128_CC) { /* Do a test run of encoding the linear component to establish its width */ linear_width = linear_dummy_run((unsigned char *) symbol->primary, pri_len); if (linear_width == 0) { @@ -1445,23 +1445,23 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l return ZINT_ERROR_TOO_LONG; } break; - case BARCODE_EAN128_CC: cc_width = 4; + case BARCODE_GS1_128_CC: cc_width = 4; break; - case BARCODE_RSS14_CC: cc_width = 4; + case BARCODE_DBAR_OMN_CC: cc_width = 4; break; - case BARCODE_RSS_LTD_CC: cc_width = 3; + case BARCODE_DBAR_LTD_CC: cc_width = 3; break; - case BARCODE_RSS_EXP_CC: cc_width = 4; + case BARCODE_DBAR_EXP_CC: cc_width = 4; break; case BARCODE_UPCA_CC: cc_width = 4; break; case BARCODE_UPCE_CC: cc_width = 2; break; - case BARCODE_RSS14STACK_CC: cc_width = 2; + case BARCODE_DBAR_STK_CC: cc_width = 2; break; - case BARCODE_RSS14_OMNI_CC: cc_width = 2; + case BARCODE_DBAR_OMNSTK_CC: cc_width = 2; break; - case BARCODE_RSS_EXPSTACK_CC: cc_width = 4; + case BARCODE_DBAR_EXPSTK_CC: cc_width = 4; break; } @@ -1485,7 +1485,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l /* If the data didn't fit into CC-A it is recalculated for CC-B */ i = cc_binary_string(symbol, (char *) source, binary_string, cc_mode, &cc_width, &ecc_level, linear_width); if (i == ZINT_ERROR_TOO_LONG) { - if (symbol->symbology != BARCODE_EAN128_CC) { + if (symbol->symbology != BARCODE_GS1_128_CC) { return ZINT_ERROR_TOO_LONG; } cc_mode = 3; @@ -1523,7 +1523,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l linear->symbology = symbol->symbology; linear->debug = symbol->debug; - if (linear->symbology != BARCODE_EAN128_CC) { + if (linear->symbology != BARCODE_GS1_128_CC) { /* Set the "component linkage" flag in the linear component */ linear->option_1 = 2; } else { @@ -1534,23 +1534,23 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l switch (symbol->symbology) { case BARCODE_EANX_CC: error_number = eanx(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_EAN128_CC: error_number = ean_128(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_GS1_128_CC: error_number = ean_128(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_RSS14_CC: error_number = rss14(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_DBAR_OMN_CC: error_number = rss14(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_RSS_LTD_CC: error_number = rsslimited(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_DBAR_LTD_CC: error_number = rsslimited(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_RSS_EXP_CC: error_number = rssexpanded(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_DBAR_EXP_CC: error_number = rssexpanded(linear, (unsigned char *) symbol->primary, pri_len); break; case BARCODE_UPCA_CC: error_number = eanx(linear, (unsigned char *) symbol->primary, pri_len); break; case BARCODE_UPCE_CC: error_number = eanx(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_RSS14STACK_CC: error_number = rss14(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_DBAR_STK_CC: error_number = rss14(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_RSS14_OMNI_CC: error_number = rss14(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_DBAR_OMNSTK_CC: error_number = rss14(linear, (unsigned char *) symbol->primary, pri_len); break; - case BARCODE_RSS_EXPSTACK_CC: error_number = rssexpanded(linear, (unsigned char *) symbol->primary, pri_len); + case BARCODE_DBAR_EXPSTK_CC: error_number = rssexpanded(linear, (unsigned char *) symbol->primary, pri_len); break; } @@ -1586,7 +1586,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l break; } break; - case BARCODE_EAN128_CC: if (cc_mode == 3) { + case BARCODE_GS1_128_CC: if (cc_mode == 3) { bottom_shift = 7; } else { /* ISO/IEC 24723:2010 12.3 g) "GS1-128 components linked to the right quiet zone of the CC-A or CC-B: the CC-A or CC-B component is @@ -1607,16 +1607,16 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l } } break; - case BARCODE_RSS14_CC: bottom_shift = 4; + case BARCODE_DBAR_OMN_CC: bottom_shift = 4; break; - case BARCODE_RSS_LTD_CC: + case BARCODE_DBAR_LTD_CC: if (cc_mode == 1) { top_shift = 1; } else { bottom_shift = 9; } break; - case BARCODE_RSS_EXP_CC: k = 1; + case BARCODE_DBAR_EXP_CC: k = 1; while ((!(module_is_set(linear, 1, k - 1))) && module_is_set(linear, 1, k)) { k++; } @@ -1626,11 +1626,11 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l break; case BARCODE_UPCE_CC: bottom_shift = 2; break; - case BARCODE_RSS14STACK_CC: top_shift = 1; + case BARCODE_DBAR_STK_CC: top_shift = 1; break; - case BARCODE_RSS14_OMNI_CC: top_shift = 1; + case BARCODE_DBAR_OMNSTK_CC: top_shift = 1; break; - case BARCODE_RSS_EXPSTACK_CC: k = 1; + case BARCODE_DBAR_EXPSTK_CC: k = 1; while ((!(module_is_set(linear, 1, k - 1))) && module_is_set(linear, 1, k)) { k++; } diff --git a/backend/library.c b/backend/library.c index 811462e9..9478035d 100644 --- a/backend/library.c +++ b/backend/library.c @@ -381,11 +381,11 @@ static int check_force_gs1(const int symbology) { int result = is_composite(symbology); switch (symbology) { - case BARCODE_EAN128: + case BARCODE_GS1_128: case BARCODE_EAN14: case BARCODE_NVE18: - case BARCODE_RSS_EXP: - case BARCODE_RSS_EXPSTACK: + case BARCODE_DBAR_EXP: + case BARCODE_DBAR_EXPSTK: result = 1; break; } @@ -448,7 +448,7 @@ static int is_linear(const int symbology) { int result = 0; switch (symbology) { case BARCODE_CODE11: - case BARCODE_C25MATRIX: + case BARCODE_C25STANDARD: case BARCODE_C25INTER: case BARCODE_C25IATA: case BARCODE_C25LOGIC: @@ -457,16 +457,16 @@ static int is_linear(const int symbology) { case BARCODE_EXCODE39: case BARCODE_EANX: case BARCODE_EANX_CHK: - case BARCODE_EAN128: + case BARCODE_GS1_128: case BARCODE_CODABAR: case BARCODE_CODE128: case BARCODE_DPLEIT: case BARCODE_DPIDENT: case BARCODE_CODE93: case BARCODE_FLAT: - case BARCODE_RSS14: - case BARCODE_RSS_LTD: - case BARCODE_RSS_EXP: + case BARCODE_DBAR_OMN: + case BARCODE_DBAR_LTD: + case BARCODE_DBAR_EXP: case BARCODE_TELEPEN: case BARCODE_UPCA: case BARCODE_UPCA_CHK: @@ -482,7 +482,7 @@ static int is_linear(const int symbology) { case BARCODE_EAN14: case BARCODE_NVE18: case BARCODE_KOREAPOST: - case BARCODE_ONECODE: + case BARCODE_USPS_IMAIL: case BARCODE_PLESSEY: case BARCODE_TELEPEN_NUM: case BARCODE_ITF14: @@ -490,10 +490,10 @@ static int is_linear(const int symbology) { case BARCODE_HIBC_39: case BARCODE_CODE32: case BARCODE_EANX_CC: - case BARCODE_EAN128_CC: - case BARCODE_RSS14_CC: - case BARCODE_RSS_LTD_CC: - case BARCODE_RSS_EXP_CC: + case BARCODE_GS1_128_CC: + case BARCODE_DBAR_OMN_CC: + case BARCODE_DBAR_LTD_CC: + case BARCODE_DBAR_EXP_CC: case BARCODE_UPCA_CC: case BARCODE_UPCE_CC: case BARCODE_CHANNEL: @@ -536,7 +536,7 @@ int ZBarcode_ValidID(int symbol_id) { switch (symbol_id) { case BARCODE_CODE11: - case BARCODE_C25MATRIX: + case BARCODE_C25STANDARD: case BARCODE_C25INTER: case BARCODE_C25IATA: case BARCODE_C25LOGIC: @@ -545,7 +545,7 @@ int ZBarcode_ValidID(int symbol_id) { case BARCODE_EXCODE39: case BARCODE_EANX: case BARCODE_EANX_CHK: - case BARCODE_EAN128: + case BARCODE_GS1_128: case BARCODE_CODABAR: case BARCODE_CODE128: case BARCODE_DPLEIT: @@ -554,9 +554,9 @@ int ZBarcode_ValidID(int symbol_id) { case BARCODE_CODE49: case BARCODE_CODE93: case BARCODE_FLAT: - case BARCODE_RSS14: - case BARCODE_RSS_LTD: - case BARCODE_RSS_EXP: + case BARCODE_DBAR_OMN: + case BARCODE_DBAR_LTD: + case BARCODE_DBAR_EXP: case BARCODE_TELEPEN: case BARCODE_UPCA: case BARCODE_UPCA_CHK: @@ -585,12 +585,12 @@ int ZBarcode_ValidID(int symbol_id) { case BARCODE_NVE18: case BARCODE_JAPANPOST: case BARCODE_KOREAPOST: - case BARCODE_RSS14STACK: - case BARCODE_RSS14STACK_OMNI: - case BARCODE_RSS_EXPSTACK: + case BARCODE_DBAR_STK: + case BARCODE_DBAR_OMNSTK: + case BARCODE_DBAR_EXPSTK: case BARCODE_PLANET: case BARCODE_MICROPDF417: - case BARCODE_ONECODE: + case BARCODE_USPS_IMAIL: case BARCODE_PLESSEY: case BARCODE_TELEPEN_NUM: case BARCODE_ITF14: @@ -609,15 +609,15 @@ int ZBarcode_ValidID(int symbol_id) { case BARCODE_AZRUNE: case BARCODE_CODE32: case BARCODE_EANX_CC: - case BARCODE_EAN128_CC: - case BARCODE_RSS14_CC: - case BARCODE_RSS_LTD_CC: - case BARCODE_RSS_EXP_CC: + case BARCODE_GS1_128_CC: + case BARCODE_DBAR_OMN_CC: + case BARCODE_DBAR_LTD_CC: + case BARCODE_DBAR_EXP_CC: case BARCODE_UPCA_CC: case BARCODE_UPCE_CC: - case BARCODE_RSS14STACK_CC: - case BARCODE_RSS14_OMNI_CC: - case BARCODE_RSS_EXPSTACK_CC: + case BARCODE_DBAR_STK_CC: + case BARCODE_DBAR_OMNSTK_CC: + case BARCODE_DBAR_EXPSTK_CC: case BARCODE_CHANNEL: case BARCODE_CODEONE: case BARCODE_GRIDMATRIX: @@ -693,7 +693,7 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour } switch (symbol->symbology) { - case BARCODE_C25MATRIX: error_number = matrix_two_of_five(symbol, preprocessed, in_length); + case BARCODE_C25STANDARD: error_number = matrix_two_of_five(symbol, preprocessed, in_length); break; case BARCODE_C25IND: error_number = industrial_two_of_five(symbol, preprocessed, in_length); break; @@ -715,7 +715,7 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour case BARCODE_EANX_CHK: error_number = eanx(symbol, preprocessed, in_length); break; - case BARCODE_EAN128: error_number = ean_128(symbol, preprocessed, in_length); + case BARCODE_GS1_128: error_number = ean_128(symbol, preprocessed, in_length); break; case BARCODE_CODE39: error_number = c39(symbol, preprocessed, in_length); break; @@ -769,31 +769,31 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour break; case BARCODE_PHARMA_TWO: error_number = pharma_two(symbol, preprocessed, in_length); break; - case BARCODE_ONECODE: error_number = imail(symbol, preprocessed, in_length); + case BARCODE_USPS_IMAIL: error_number = imail(symbol, preprocessed, in_length); break; case BARCODE_ISBNX: error_number = eanx(symbol, preprocessed, in_length); break; - case BARCODE_RSS14: - case BARCODE_RSS14STACK: - case BARCODE_RSS14STACK_OMNI: + case BARCODE_DBAR_OMN: + case BARCODE_DBAR_STK: + case BARCODE_DBAR_OMNSTK: error_number = rss14(symbol, preprocessed, in_length); break; - case BARCODE_RSS_LTD: error_number = rsslimited(symbol, preprocessed, in_length); + case BARCODE_DBAR_LTD: error_number = rsslimited(symbol, preprocessed, in_length); break; - case BARCODE_RSS_EXP: - case BARCODE_RSS_EXPSTACK: + case BARCODE_DBAR_EXP: + case BARCODE_DBAR_EXPSTK: error_number = rssexpanded(symbol, preprocessed, in_length); break; case BARCODE_EANX_CC: - case BARCODE_EAN128_CC: - case BARCODE_RSS14_CC: - case BARCODE_RSS_LTD_CC: - case BARCODE_RSS_EXP_CC: + case BARCODE_GS1_128_CC: + case BARCODE_DBAR_OMN_CC: + case BARCODE_DBAR_LTD_CC: + case BARCODE_DBAR_EXP_CC: case BARCODE_UPCA_CC: case BARCODE_UPCE_CC: - case BARCODE_RSS14STACK_CC: - case BARCODE_RSS14_OMNI_CC: - case BARCODE_RSS_EXPSTACK_CC: + case BARCODE_DBAR_STK_CC: + case BARCODE_DBAR_OMNSTK_CC: + case BARCODE_DBAR_EXPSTK_CC: error_number = composite(symbol, preprocessed, in_length); break; case BARCODE_KIX: error_number = kix_code(symbol, preprocessed, in_length); @@ -1007,7 +1007,7 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int /* symbol->symbologys 1 to 86 are defined by tbarcode */ if (symbol->symbology == 5) { - symbol->symbology = BARCODE_C25MATRIX; + symbol->symbology = BARCODE_C25STANDARD; } if ((symbol->symbology >= 10) && (symbol->symbology <= 12)) { symbol->symbology = BARCODE_EANX; @@ -1031,7 +1031,7 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int error_number = ZINT_ERROR_INVALID_OPTION; } if (symbol->symbology == 33) { - symbol->symbology = BARCODE_EAN128; + symbol->symbology = BARCODE_GS1_128; } if (symbol->symbology == 36) { symbol->symbology = BARCODE_UPCA; @@ -1060,13 +1060,13 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int symbol->symbology = BARCODE_AUSPOST; } if (symbol->symbology == 78) { - symbol->symbology = BARCODE_RSS14; + symbol->symbology = BARCODE_DBAR_OMN; } if (symbol->symbology == 83) { symbol->symbology = BARCODE_PLANET; } if (symbol->symbology == 88) { - symbol->symbology = BARCODE_EAN128; + symbol->symbology = BARCODE_GS1_128; } if (symbol->symbology == 91) { strcpy(symbol->errtxt, "212: Symbology out of range, using Code 128"); diff --git a/backend/output.c b/backend/output.c index b7bd48e8..ea358df7 100644 --- a/backend/output.c +++ b/backend/output.c @@ -170,7 +170,7 @@ static int quiet_zones(struct zint_symbol *symbol, int *left, int *right, int *t /* TODO */ break; - case BARCODE_C25MATRIX: + case BARCODE_C25STANDARD: case BARCODE_C25INTER: case BARCODE_C25IATA: case BARCODE_C25LOGIC: @@ -190,8 +190,8 @@ static int quiet_zones(struct zint_symbol *symbol, int *left, int *right, int *t *left = *right = 10; done = 1; break; - case BARCODE_EAN128: /* GS1-128 */ - case BARCODE_EAN128_CC: + case BARCODE_GS1_128: /* GS1-128 */ + case BARCODE_GS1_128_CC: case BARCODE_EAN14: /* GS1 General Specifications 20.0 Section 5.4.4.2 */ *left = *right = 10; @@ -224,22 +224,22 @@ static int quiet_zones(struct zint_symbol *symbol, int *left, int *right, int *t /* TODO */ break; - case BARCODE_RSS14: /* GS1 Databar Omnidirectional */ - case BARCODE_RSS_LTD: /* GS1 Databar Limited */ - case BARCODE_RSS_EXP: /* GS1 Databar Expanded */ - case BARCODE_RSS14STACK: /* GS1 DataBar Stacked */ - case BARCODE_RSS14STACK_OMNI: /* GS1 DataBar Stacked Omnidirectional */ - case BARCODE_RSS_EXPSTACK: /* GS1 Databar Expanded Stacked */ + case BARCODE_DBAR_OMN: /* GS1 Databar Omnidirectional */ + case BARCODE_DBAR_LTD: /* GS1 Databar Limited */ + case BARCODE_DBAR_EXP: /* GS1 Databar Expanded */ + case BARCODE_DBAR_STK: /* GS1 DataBar Stacked */ + case BARCODE_DBAR_OMNSTK: /* GS1 DataBar Stacked Omnidirectional */ + case BARCODE_DBAR_EXPSTK: /* GS1 Databar Expanded Stacked */ /* GS1 General Specifications 20.0 Section 5.5.1.1 - Quiet Zones: None required */ *left = *right = 0; done = 1; break; - case BARCODE_RSS14_CC: - case BARCODE_RSS_LTD_CC: - case BARCODE_RSS_EXP_CC: - case BARCODE_RSS14STACK_CC: - case BARCODE_RSS14_OMNI_CC: - case BARCODE_RSS_EXPSTACK_CC: + case BARCODE_DBAR_OMN_CC: + case BARCODE_DBAR_LTD_CC: + case BARCODE_DBAR_EXP_CC: + case BARCODE_DBAR_STK_CC: + case BARCODE_DBAR_OMNSTK_CC: + case BARCODE_DBAR_EXPSTK_CC: /* GS1 General Specifications 20.0 Sections 5.9.2.1 (CC-A) & 5.9.2.2 (CC-B) */ *left = *right = 1; done = 1; @@ -335,7 +335,7 @@ static int quiet_zones(struct zint_symbol *symbol, int *left, int *right, int *t /* TODO */ break; - case BARCODE_ONECODE: + case BARCODE_USPS_IMAIL: /* USPS-B-3200 (2015) Section 2.3.2 left/right 0.125" ~ 6X, top/bottom 0.026" ~ 1X */ *left = *right = 6; // TODO: Proper inch to X calc *top = *bottom = 1; // TODO: Proper inch to X calc diff --git a/backend/rss.c b/backend/rss.c index 543ba176..e8776236 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -1,4 +1,4 @@ -/* rss.c - Handles Reduced Space Symbology (GS1 DataBar) */ +/* rss.c - GS1 DataBar (formerly Reduced Space Symbology) */ /* libzint - the open source barcode library @@ -302,9 +302,9 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l /* make some room for a separator row for composite symbols */ switch (symbol->symbology) { - case BARCODE_RSS14_CC: - case BARCODE_RSS14STACK_CC: - case BARCODE_RSS14_OMNI_CC: + case BARCODE_DBAR_OMN_CC: + case BARCODE_DBAR_STK_CC: + case BARCODE_DBAR_OMNSTK_CC: separator_row = symbol->rows; symbol->row_height[separator_row] = 1; symbol->rows += 1; @@ -470,7 +470,7 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l } /* Put this data into the symbol */ - if ((symbol->symbology == BARCODE_RSS14) || (symbol->symbology == BARCODE_RSS14_CC)) { + if ((symbol->symbology == BARCODE_DBAR_OMN) || (symbol->symbology == BARCODE_DBAR_OMN_CC)) { writer = 0; latch = '0'; for (i = 0; i < 46; i++) { @@ -479,7 +479,7 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l if (symbol->width < writer) { symbol->width = writer; } - if (symbol->symbology == BARCODE_RSS14_CC) { + if (symbol->symbology == BARCODE_DBAR_OMN_CC) { /* separator pattern for composite symbol */ rss14_separator(symbol, 96, separator_row, 1 /*above*/, 18, 63, 0 /*bottom_finder_value_3*/); } @@ -491,7 +491,7 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l set_minimum_height(symbol, 14); // Minimum height is 14X for truncated symbol } - if ((symbol->symbology == BARCODE_RSS14STACK) || (symbol->symbology == BARCODE_RSS14STACK_CC)) { + if ((symbol->symbology == BARCODE_DBAR_STK) || (symbol->symbology == BARCODE_DBAR_STK_CC)) { /* top row */ writer = 0; latch = '0'; @@ -531,7 +531,7 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l unset_module(symbol, symbol->rows - 1, 3); symbol->row_height[symbol->rows - 1] = 1; - if (symbol->symbology == BARCODE_RSS14STACK_CC) { + if (symbol->symbology == BARCODE_DBAR_STK_CC) { /* separator pattern for composite symbol */ rss14_separator(symbol, 50, separator_row, 1 /*above*/, 18, 0, 0 /*bottom_finder_value_3*/); } @@ -541,7 +541,7 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l } } - if ((symbol->symbology == BARCODE_RSS14STACK_OMNI) || (symbol->symbology == BARCODE_RSS14_OMNI_CC)) { + if ((symbol->symbology == BARCODE_DBAR_OMNSTK) || (symbol->symbology == BARCODE_DBAR_OMNSTK_CC)) { /* top row */ writer = 0; latch = '0'; @@ -579,7 +579,7 @@ INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_l symbol->width = 50; } - if (symbol->symbology == BARCODE_RSS14_OMNI_CC) { + if (symbol->symbology == BARCODE_DBAR_OMNSTK_CC) { /* separator pattern for composite symbol */ rss14_separator(symbol, 50, separator_row, 1 /*above*/, 18, 0, 0 /*bottom_finder_value_3*/); } @@ -631,7 +631,7 @@ INTERNAL int rsslimited(struct zint_symbol *symbol, unsigned char source[], int } /* make some room for a separator row for composite symbols */ - if (symbol->symbology == BARCODE_RSS_LTD_CC) { + if (symbol->symbology == BARCODE_DBAR_LTD_CC) { separator_row = symbol->rows; symbol->row_height[separator_row] = 1; symbol->rows += 1; @@ -748,7 +748,7 @@ INTERNAL int rsslimited(struct zint_symbol *symbol, unsigned char source[], int symbol->rows = symbol->rows + 1; /* add separator pattern if composite symbol */ - if (symbol->symbology == BARCODE_RSS_LTD_CC) { + if (symbol->symbology == BARCODE_DBAR_LTD_CC) { for (i = 4; i < 70; i++) { if (!(module_is_set(symbol, separator_row + 1, i))) { set_module(symbol, separator_row, i); @@ -1109,7 +1109,7 @@ static int rss_binary_string(struct zint_symbol *symbol, char source[], char bin } symbol_characters = ((strlen(binary_string) + remainder) / 12) + 1; - if ((symbol->symbology == BARCODE_RSS_EXPSTACK) || (symbol->symbology == BARCODE_RSS_EXPSTACK_CC)) { + if ((symbol->symbology == BARCODE_DBAR_EXPSTK) || (symbol->symbology == BARCODE_DBAR_EXPSTK_CC)) { characters_per_row = symbol->option_2 * 2; if ((characters_per_row < 2) || (characters_per_row > 20)) { @@ -1146,7 +1146,7 @@ static int rss_binary_string(struct zint_symbol *symbol, char source[], char bin } symbol_characters = ((strlen(binary_string) + remainder) / 12) + 1; - if ((symbol->symbology == BARCODE_RSS_EXPSTACK) || (symbol->symbology == BARCODE_RSS_EXPSTACK_CC)) { + if ((symbol->symbology == BARCODE_DBAR_EXPSTK) || (symbol->symbology == BARCODE_DBAR_EXPSTK_CC)) { characters_per_row = symbol->option_2 * 2; if ((characters_per_row < 2) || (characters_per_row > 20)) { @@ -1298,7 +1298,7 @@ INTERNAL int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int return i; } - if ((symbol->symbology == BARCODE_RSS_EXP_CC) || (symbol->symbology == BARCODE_RSS_EXPSTACK_CC)) { + if ((symbol->symbology == BARCODE_DBAR_EXP_CC) || (symbol->symbology == BARCODE_DBAR_EXPSTK_CC)) { /* make space for a composite separator pattern */ separator_row = symbol->rows; symbol->row_height[separator_row] = 1; @@ -1448,7 +1448,7 @@ INTERNAL int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int } } - if ((symbol->symbology == BARCODE_RSS_EXP) || (symbol->symbology == BARCODE_RSS_EXP_CC)) { + if ((symbol->symbology == BARCODE_DBAR_EXP) || (symbol->symbology == BARCODE_DBAR_EXP_CC)) { /* Copy elements into symbol */ elements[0] = 1; // left guard @@ -1606,7 +1606,7 @@ INTERNAL int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int symbol->rows = symbol->rows - 3; } - if (symbol->symbology == BARCODE_RSS_EXP_CC || symbol->symbology == BARCODE_RSS_EXPSTACK_CC) { + if (symbol->symbology == BARCODE_DBAR_EXP_CC || symbol->symbology == BARCODE_DBAR_EXPSTK_CC) { /* Composite separator */ rssexp_separator(symbol, symbol->width, 4, separator_row, 1 /*above*/, 0 /*special_case_row*/, 1 /*left_to_right*/, 0 /*odd_last_row*/, NULL); } diff --git a/backend/tests/test_2of5.c b/backend/tests/test_2of5.c index bfb752c1..29add982 100644 --- a/backend/tests/test_2of5.c +++ b/backend/tests/test_2of5.c @@ -46,8 +46,8 @@ static void test_large(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_C25MATRIX, "1", 80, 0, 1, 817 }, - /* 1*/ { BARCODE_C25MATRIX, "1", 81, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 0*/ { BARCODE_C25STANDARD, "1", 80, 0, 1, 817 }, + /* 1*/ { BARCODE_C25STANDARD, "1", 81, ZINT_ERROR_TOO_LONG, -1, -1 }, /* 2*/ { BARCODE_C25INTER, "1", 89, 0, 1, 819 }, /* 3*/ { BARCODE_C25INTER, "1", 90, ZINT_ERROR_TOO_LONG, -1, -1 }, /* 4*/ { BARCODE_C25IATA, "1", 45, 0, 1, 639 }, @@ -105,7 +105,7 @@ static void test_hrt(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_C25MATRIX, "123456789", "123456789" }, + /* 0*/ { BARCODE_C25STANDARD, "123456789", "123456789" }, /* 1*/ { BARCODE_C25INTER, "123456789", "0123456789" }, // Adds leading zero if odd /* 2*/ { BARCODE_C25IATA, "123456789", "123456789" }, /* 3*/ { BARCODE_C25LOGIC, "123456789", "123456789" }, @@ -155,7 +155,7 @@ static void test_input(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_C25MATRIX, "A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 0*/ { BARCODE_C25STANDARD, "A", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 1*/ { BARCODE_C25INTER, "A", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 2*/ { BARCODE_C25IATA, "A", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 3*/ { BARCODE_C25LOGIC, "A", ZINT_ERROR_INVALID_DATA, -1, -1 }, @@ -208,7 +208,7 @@ static void test_encode(int index, int generate, int debug) { }; // BARCODE_ITF14 examples verified manually against GS1 General Specifications 20.0 struct item data[] = { - /* 0*/ { BARCODE_C25MATRIX, "87654321", 0, 1, 97, "Standard Code 2 of 5; note zint uses 4X start/end wides while BWIPP uses 3X", + /* 0*/ { BARCODE_C25STANDARD, "87654321", 0, 1, 97, "Standard Code 2 of 5; note zint uses 4X start/end wides while BWIPP uses 3X", "1111010101110100010101000111010001110101110111010101110111011100010101000101110111010111011110101" }, /* 1*/ { BARCODE_C25INTER, "87654321", 0, 1, 81, "Interleaved Code 2 of 5; verified manually against tec-it", diff --git a/backend/tests/test_code128.c b/backend/tests/test_code128.c index 627a4d51..54b5408f 100644 --- a/backend/tests/test_code128.c +++ b/backend/tests/test_code128.c @@ -29,7 +29,7 @@ */ /* vim: set ts=4 sw=4 et : */ -/* Note BARCODE_EAN128, BARCODE_EAN14, BARCODE_NVE18 also tested in test_gs1.c */ +/* Note BARCODE_GS1_128, BARCODE_EAN14, BARCODE_NVE18 also tested in test_gs1.c */ #include "testcommon.h" @@ -58,8 +58,8 @@ static void test_large(int index, int debug) { /* 7*/ { BARCODE_CODE128B, "A", 61, ZINT_ERROR_TOO_LONG, -1 }, /* 8*/ { BARCODE_CODE128B, "0", 60, 0, 695 }, /* 9*/ { BARCODE_CODE128B, "0", 61, ZINT_ERROR_TOO_LONG, -1 }, - /* 10*/ { BARCODE_EAN128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890", -1, 0, 706 }, // 116 nos + 3 FNC1s - /* 11*/ { BARCODE_EAN128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234[93]1234", -1, ZINT_ERROR_TOO_LONG, -1 }, // 116 nos + 4 FNC1s + /* 10*/ { BARCODE_GS1_128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890", -1, 0, 706 }, // 116 nos + 3 FNC1s + /* 11*/ { BARCODE_GS1_128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234[93]1234", -1, ZINT_ERROR_TOO_LONG, -1 }, // 116 nos + 4 FNC1s /* 12*/ { BARCODE_EAN14, "1234567890123", -1, 0, 134 }, /* 13*/ { BARCODE_EAN14, "12345678901234", -1, ZINT_ERROR_TOO_LONG, -1 }, /* 14*/ { BARCODE_NVE18, "12345678901234567", -1, 0, 156 }, @@ -184,7 +184,7 @@ static void test_hrt(int index, int debug) { /* 7*/ { BARCODE_CODE128B, DATA_MODE, "abcd\351", -1, "abcdé" }, /* 8*/ { BARCODE_HIBC_128, UNICODE_MODE, "1234567890", -1, "*+12345678900*" }, /* 9*/ { BARCODE_HIBC_128, UNICODE_MODE, "a99912345", -1, "*+A999123457*" }, // Converts to upper - // BARCODE_EAN128, BARCODE_EAN14, BARCODE_NVE18 hrt tested in test_gs1.c + // BARCODE_GS1_128, BARCODE_EAN14, BARCODE_NVE18 hrt tested in test_gs1.c }; int data_size = ARRAY_SIZE(data); @@ -230,7 +230,7 @@ static void test_reader_init(int index, int generate, int debug) { /* 0*/ { BARCODE_CODE128, UNICODE_MODE, READER_INIT, "A", 0, 1, 57, "(5) 104 96 33 60 106", "StartA FNC3 A" }, /* 1*/ { BARCODE_CODE128, UNICODE_MODE, READER_INIT, "12", 0, 1, 68, "(6) 104 96 99 12 22 106", "StartB FNC3 CodeC 12" }, /* 2*/ { BARCODE_CODE128B, UNICODE_MODE, READER_INIT, "\0371234", 0, 1, 101, "(9) 103 96 95 17 18 19 20 6 106", "StartA FNC3 US 1 2 3 4" }, - /* 3*/ { BARCODE_EAN128, GS1_MODE, READER_INIT, "[90]12", 0, 1, 68, "(6) 105 102 90 12 11 106", "StartC FNC1 90 12 (Reader Initialise not supported by GS1 barcodes (use CODE128))" }, + /* 3*/ { BARCODE_GS1_128, GS1_MODE, READER_INIT, "[90]12", 0, 1, 68, "(6) 105 102 90 12 11 106", "StartC FNC1 90 12 (Reader Initialise not supported by GS1 barcodes (use CODE128))" }, /* 4*/ { BARCODE_EAN14, GS1_MODE, READER_INIT, "12", 0, 1, 134, "(12) 105 102 1 0 0 0 0 0 1 25 30 106", "StartC FNC1 01 00 (5) 01 (Reader Initialise not supported by GS1 barcodes (use CODE128))" }, /* 5*/ { BARCODE_NVE18, GS1_MODE, READER_INIT, "12", 0, 1, 156, "(14) 105 102 0 0 0 0 0 0 0 0 1 25 80 106", "StartC FNC1 00 (8) 01 (Reader Initialise not supported by GS1 barcodes (use CODE128))" }, /* 6*/ { BARCODE_HIBC_128, UNICODE_MODE, READER_INIT, "A", 0, 1, 79, "(7) 104 96 11 33 24 5 106", "StartA FNC3 + A 8 (check) (Not sensible, use CODE128)" }, @@ -413,7 +413,7 @@ static void test_ean128_input(int index, int generate, int debug) { symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt - int length = testUtilSetSymbol(symbol, BARCODE_EAN128, GS1_MODE, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); + int length = testUtilSetSymbol(symbol, BARCODE_GS1_128, GS1_MODE, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); ret = ZBarcode_Encode(symbol, data[i].data, length); assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); @@ -505,7 +505,7 @@ static void test_encode(int index, int generate, int debug) { char *comment; char *expected; }; - // BARCODE_EAN128 examples verified manually against GS1 General Specifications 20.0 (GGS) + // BARCODE_GS1_128 examples verified manually against GS1 General Specifications 20.0 (GGS) struct item data[] = { /* 0*/ { BARCODE_CODE128, UNICODE_MODE, "AIM", 0, 1, 68, 1, "ISO/IEC 15417:2007 Figure 1", "11010010000101000110001100010001010111011000101110110001100011101011" @@ -519,94 +519,94 @@ static void test_encode(int index, int generate, int debug) { /* 3*/ { BARCODE_CODE128B, UNICODE_MODE, "1234567890", 0, 1, 145, 1, "", "1101001000010011100110110011100101100101110011001001110110111001001100111010011101101110111010011001110010110010011101100101000110001100011101011" }, - /* 4*/ { BARCODE_EAN128, GS1_MODE, "[8018]950110153123456781", 0, 1, 167, 1, "GGS Figure 2.5.2-1", + /* 4*/ { BARCODE_GS1_128, GS1_MODE, "[8018]950110153123456781", 0, 1, 167, 1, "GGS Figure 2.5.2-1", "11010011100111101011101010011110011001110010101111010001100110110011001000100101110011001101100011011101101110101110110001000010110010010111100101111001001100011101011" }, - /* 5*/ { BARCODE_EAN128, GS1_MODE, "[415]5412345678908[3911]710125", 0, 1, 189, 1, "GGS Figure 2.6.6-1 top", + /* 5*/ { BARCODE_GS1_128, GS1_MODE, "[415]5412345678908[3911]710125", 0, 1, 189, 1, "GGS Figure 2.6.6-1 top", "110100111001111010111011000100010111010001101100010001011101101110101110110001000010110011011011110100011001001101000100011000100100100110100001100110110011100101100100001001101100011101011" }, - /* 6*/ { BARCODE_EAN128, GS1_MODE, "[12]010425[8020]ABC123", 0, 1, 189, 1, "GGS Figure 2.6.6-1 bottom", + /* 6*/ { BARCODE_GS1_128, GS1_MODE, "[12]010425[8020]ABC123", 0, 1, 189, 1, "GGS Figure 2.6.6-1 bottom", "110100111001111010111010110011100110011011001001000110011100101100101001111001100100111010111101110101000110001000101100010001000110100111001101100111001011001011100110010111001100011101011" }, - /* 7*/ { BARCODE_EAN128, GS1_MODE, "[253]950110153005812345678901", 0, 1, 211, 1, "GGS Figure 2.6.9-1", + /* 7*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153005812345678901", 0, 1, 211, 1, "GGS Figure 2.6.9-1", "1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001110110001010110011100100010110001110001011011000010100110111101101011110111010011100110101110110001100011101011" }, - /* 8*/ { BARCODE_EAN128, GS1_MODE, "[253]950110153006567890543210987", 0, 1, 211, 1, "GGS Figure 2.6.9-2", + /* 8*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153006567890543210987", 0, 1, 211, 1, "GGS Figure 2.6.9-2", "1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001001011000010000101100110110111101000100110010110001110110111001001100100100011110010100101110011001100011101011" }, - /* 9*/ { BARCODE_EAN128, GS1_MODE, "[253]95011015300657654321", 0, 1, 189, 1, "GGS Figure 2.6.9-3", + /* 9*/ { BARCODE_GS1_128, GS1_MODE, "[253]95011015300657654321", 0, 1, 189, 1, "GGS Figure 2.6.9-3", "110100111001111010111011100101100110100010001100010111011000100100110011011001101110111011011001100100101100001100101000011101011000110001101101011110111010011100110111001001101100011101011" }, - /* 10*/ { BARCODE_EAN128, GS1_MODE, "[253]9501101530065123456", 0, 1, 167, 1, "GGS Figure 2.6.9-4", + /* 10*/ { BARCODE_GS1_128, GS1_MODE, "[253]9501101530065123456", 0, 1, 167, 1, "GGS Figure 2.6.9-4", "11010011100111101011101110010110011010001000110001011101100010010011001101100110111011101101100110010010110000101100111001000101100011100010110100011110101100011101011" }, - /* 11*/ { BARCODE_EAN128, GS1_MODE, "[01]10857674002017[10]1152KMB", 0, 1, 211, 1, "GGS Figure 4.15.1-1", + /* 11*/ { BARCODE_GS1_128, GS1_MODE, "[01]10857674002017[10]1152KMB", 0, 1, 211, 1, "GGS Figure 4.15.1-1", "1101001110011110101110110011011001100100010010011110010110010100001000011001011011001100110010011101001110011011001000100110001001001101110001010111101110101100011101011101100010001011000100111001101100011101011" }, - /* 12*/ { BARCODE_EAN128, GS1_MODE, "[01]09501101530003", 0, 1, 134, 1, "GGS Figure 5.1-3", + /* 12*/ { BARCODE_GS1_128, GS1_MODE, "[01]09501101530003", 0, 1, 134, 1, "GGS Figure 5.1-3", "11010011100111101011101100110110011001001000110001011101100010010011001101100110111011101101100110010010011000100110100001100011101011" }, - /* 13*/ { BARCODE_EAN128, GS1_MODE, "[00]395123451234567895", 0, 1, 156, 1, "GGS Figure 5.4.2-1", + /* 13*/ { BARCODE_GS1_128, GS1_MODE, "[00]395123451234567895", 0, 1, 156, 1, "GGS Figure 5.4.2-1", "110100111001111010111011011001100110100010001101110100011101101110101110110001011001110010001011000111000101101100001010010111101000101111000101100011101011" }, - /* 14*/ { BARCODE_EAN128, GS1_MODE, "[00]006141411234567890", 0, 1, 156, 1, "GGS Figure 6.6.5-1. (and Figures 6.6.5-3 bottom, 6.6.5-4 bottom)", + /* 14*/ { BARCODE_GS1_128, GS1_MODE, "[00]006141411234567890", 0, 1, 156, 1, "GGS Figure 6.6.5-1. (and Figures 6.6.5-3 bottom, 6.6.5-4 bottom)", "110100111001111010111011011001100110110011001100100001011000100010110001000101011001110010001011000111000101101100001010011011110110110110110001100011101011" }, - /* 15*/ { BARCODE_EAN128, GS1_MODE, "[403]402621[401]950110153B01001", 0, 1, 266, 0, "GGS Figure 6.6.5-2 top **NOT SAME**, different encodation for zint, BWIPP & standard, same codeword count", + /* 15*/ { BARCODE_GS1_128, GS1_MODE, "[403]402621[401]950110153B01001", 0, 1, 266, 0, "GGS Figure 6.6.5-2 top **NOT SAME**, different encodation for zint, BWIPP & standard, same codeword count", "11010011100111101011101100010100010001011000110011001101111000101010111101110100111001101011101111011110101110110001010001100101110011000101110110001001001100110110011011101110101111011101000101100010011101100101110111101100100010011001101100101001111001100011101011" }, - /* 16*/ { BARCODE_EAN128, GS1_MODE, "[00]395011015300000011", 0, 1, 156, 1, "GGS Figure 6.6.5-2 bottom", + /* 16*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011015300000011", 0, 1, 156, 1, "GGS Figure 6.6.5-2 bottom", "110100111001111010111011011001100110100010001100010111011000100100110011011001101110111011011001100110110011001101100110011000100100100011101101100011101011" }, - /* 17*/ { BARCODE_EAN128, GS1_MODE, "[420]45458", 0, 1, 90, 1, "GGS Figure 6.6.5-3 top", + /* 17*/ { BARCODE_GS1_128, GS1_MODE, "[420]45458", 0, 1, 90, 1, "GGS Figure 6.6.5-3 top", "110100111001111010111010110111000100100011001110101100011101100010111100100101100011101011" }, - /* 18*/ { BARCODE_EAN128, GS1_MODE, "[02]00614141000418[15]210228[10]451214[37]20", 0, 1, 255, 1, "GGS Figure 6.6.5-4 top", + /* 18*/ { BARCODE_GS1_128, GS1_MODE, "[02]00614141000418[15]210228[10]451214[37]20", 0, 1, 255, 1, "GGS Figure 6.6.5-4 top", "110100111001111010111011001100110110110011001100100001011000100010110001000101101100110010010001100110011100101011100110011011100100110011001101110011010011001000100101110110001011001110010011001110111101011101000110100011001001110100011110101100011101011" }, - /* 19*/ { BARCODE_EAN128, GS1_MODE, "[420]87109", 0, 1, 90, 1, "GGS Figure 6.6.5-5 top", + /* 19*/ { BARCODE_GS1_128, GS1_MODE, "[420]87109", 0, 1, 90, 1, "GGS Figure 6.6.5-5 top", "110100111001111010111010110111000100011001001001101000011001001000111001001101100011101011" }, - /* 20*/ { BARCODE_EAN128, GS1_MODE, "[90]1528", 0, 1, 79, 1, "GGS Figure 6.6.5-5 middle", + /* 20*/ { BARCODE_GS1_128, GS1_MODE, "[90]1528", 0, 1, 79, 1, "GGS Figure 6.6.5-5 middle", "1101001110011110101110110111101101011100110011100110100111001100101100011101011" }, - /* 21*/ { BARCODE_EAN128, GS1_MODE, "[00]000521775138957172", 0, 1, 156, 1, "GGS Figure 6.6.5-5 bottom", + /* 21*/ { BARCODE_GS1_128, GS1_MODE, "[00]000521775138957172", 0, 1, 156, 1, "GGS Figure 6.6.5-5 bottom", "110100111001111010111011011001100110110011001000100110011011100100111101110101101110100010001100010101111010001001101000010011000010110011011001100011101011" }, - /* 22*/ { BARCODE_EAN128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6", + /* 22*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6", "110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011" }, - /* 23*/ { BARCODE_EAN128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6", + /* 23*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6", "110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011" }, - /* 24*/ { BARCODE_EAN128, GS1_MODE, "[401]931234518430GR", 0, 1, 167, 1, "GGS Figure 6.6.5-7 top", + /* 24*/ { BARCODE_GS1_128, GS1_MODE, "[401]931234518430GR", 0, 1, 167, 1, "GGS Figure 6.6.5-7 top", "11010011100111101011101100010100011001011100110110001101110110111010111011000110011100101011000111010111101110100111011001101000100011000101110100110111001100011101011" }, - /* 25*/ { BARCODE_EAN128, GS1_MODE, "[00]093123450000000012", 0, 1, 156, 1, "GGS Figure 6.6.5-7 bottom", + /* 25*/ { BARCODE_GS1_128, GS1_MODE, "[00]093123450000000012", 0, 1, 156, 1, "GGS Figure 6.6.5-7 bottom", "110100111001111010111011011001100110010010001101100011011101101110101110110001101100110011011001100110110011001101100110010110011100110111010001100011101011" }, - /* 26*/ { BARCODE_EAN128, GS1_MODE, "[01]95012345678903", 0, 1, 134, 1, "GGS Figure 7.8.5.1-1 1st", + /* 26*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903", 0, 1, 134, 1, "GGS Figure 7.8.5.1-1 1st", "11010011100111101011101100110110010111101000110011011001110110111010111011000100001011001101101111010010011000110110001101100011101011" }, - /* 27*/ { BARCODE_EAN128, GS1_MODE, "[3102]000400", 0, 1, 101, 1, "GGS Figure 7.8.5.1-1 2nd", + /* 27*/ { BARCODE_GS1_128, GS1_MODE, "[3102]000400", 0, 1, 101, 1, "GGS Figure 7.8.5.1-1 2nd", "11010011100111101011101101100011011001100110110110011001001000110011011001100110110111101100011101011" }, - /* 28*/ { BARCODE_EAN128, GS1_MODE, "[01]95012345678903[3102]000400", 0, 1, 189, 1, "GGS Figure 7.8.5.1-2", + /* 28*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903[3102]000400", 0, 1, 189, 1, "GGS Figure 7.8.5.1-2", "110100111001111010111011001101100101111010001100110110011101101110101110110001000010110011011011110100100110001101100011011001100110110110011001001000110011011001100100100110001100011101011" }, - /* 29*/ { BARCODE_EAN128, GS1_MODE, "[8005]000365", 0, 1, 101, 1, "GGS Figure 7.8.5.2-1 1st", + /* 29*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365", 0, 1, 101, 1, "GGS Figure 7.8.5.2-1 1st", "11010011100111101011101010011110010001001100110110011001001001100010010110000100100001101100011101011" }, - /* 30*/ { BARCODE_EAN128, GS1_MODE, "[10]123456", 0, 1, 90, 1, "GGS Figure 7.8.5.2-1 2nd", + /* 30*/ { BARCODE_GS1_128, GS1_MODE, "[10]123456", 0, 1, 90, 1, "GGS Figure 7.8.5.2-1 2nd", "110100111001111010111011001000100101100111001000101100011100010110110010000101100011101011" }, - /* 31*/ { BARCODE_EAN128, GS1_MODE, "[8005]000365[10]123456", 0, 1, 156, 1, "GGS Figure 7.8.5.2-2", + /* 31*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365[10]123456", 0, 1, 156, 1, "GGS Figure 7.8.5.2-2", "110100111001111010111010100111100100010011001101100110010010011000100101100001111010111011001000100101100111001000101100011100010110101100001001100011101011" }, - /* 32*/ { BARCODE_EAN128, GS1_MODE, "[403]27653113+99000900090010", 0, 1, 222, 1, "DHL Leitcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html", + /* 32*/ { BARCODE_GS1_128, GS1_MODE, "[403]27653113+99000900090010", 0, 1, 222, 1, "DHL Leitcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html", "110100111001111010111011000101000110001101101100101000011011101110110001001001011110111011001011100110001001001011101111010111011110110110011001100100100011011001100110010010001101100110011001000100110001000101100011101011" }, - /* 33*/ { BARCODE_EAN128, GS1_MODE, "[00]340433935039756615", 0, 1, 156, 1, "DHL Identcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html", + /* 33*/ { BARCODE_GS1_128, GS1_MODE, "[00]340433935039756615", 0, 1, 156, 1, "DHL Identcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html", "110100111001111010111011011001100100010110001001000110010100011000101000111101100010111011010001000110000100101001000011010111001100100111001101100011101011" }, /* 34*/ { BARCODE_EAN14, GS1_MODE, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it", diff --git a/backend/tests/test_composite.c b/backend/tests/test_composite.c index 1a9d7813..ccc5989b 100644 --- a/backend/tests/test_composite.c +++ b/backend/tests/test_composite.c @@ -154,7 +154,7 @@ static void test_examples(int index, int generate, int debug) { }; // Verified manually against GS1 General Specifications 20.0 (GGS) and ISO/IEC 24723:2010, with noted exceptions, and verified via bwipp_dump.ps against BWIPP struct item data[] = { - /* 0*/ { BARCODE_RSS14_OMNI_CC, 1, "0401234567890", "[17]050101[10]ABC123", 0, 11, 56, "GSS Figure 5.1-5. GS1 DataBar Stacked Omnidirectional barcode with a Composite Component", + /* 0*/ { BARCODE_DBAR_OMNSTK_CC, 1, "0401234567890", "[17]050101[10]ABC123", 0, 11, 56, "GSS Figure 5.1-5. GS1 DataBar Stacked Omnidirectional barcode with a Composite Component", "01101100110101110001001100001000000110100111011110101001" "01101101110110001100010100001100001000010110011100101001" "01101101100111000101110001101001100011111010011101101001" @@ -167,7 +167,7 @@ static void test_examples(int index, int generate, int debug) { "00001000110000101010000000101010111011001111000000000000" "10100111001111010101111111000001000100110000110101000000" }, - /* 1*/ { BARCODE_RSS_LTD_CC, 1, "1311234567890", "[17]010615[10]A123456", 0, 6, 74, "GGS Figure 5.9.2-1. (24723:2010 Figure 1) GS1 DataBar Limited Composite symbol with CC-A", + /* 1*/ { BARCODE_DBAR_LTD_CC, 1, "1311234567890", "[17]010615[10]A123456", 0, 6, 74, "GGS Figure 5.9.2-1. (24723:2010 Figure 1) GS1 DataBar Limited Composite symbol with CC-A", "01111000101101100010100110001111101001100111011101001111001110111010011010" "01001111100011010010101110001111011110101111010011110111001110111010111010" "01001100110100000010101100001110010001101111011110111100101000111010110010" @@ -175,7 +175,7 @@ static void test_examples(int index, int generate, int debug) { "00000011000001010100110011101010110101001100101011110001011001101001110000" "01011100111110101011001100010101001010110011010100001110100110010110000101" }, - /* 2*/ { BARCODE_EAN128_CC, 3, "[01]03812345678908", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "GGS Figure 5.9.2-2. GS1-128 Composite symbol with CC-C **NOT SAME** as zint uses encodation '10', same if '0' forced", + /* 2*/ { BARCODE_GS1_128_CC, 3, "[01]03812345678908", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "GGS Figure 5.9.2-2. GS1-128 Composite symbol with CC-C **NOT SAME** as zint uses encodation '10', same if '0' forced", "1111111101010100011110101011110000111101011001111101110111110111010010000010000100010110010000101100001111011110110011011110101001111000111111101000101001" "1111111101010100011111101010001110100001000111101001100101110010000011100001011000100100100111110110001011100001011111011111101010111000111111101000101001" "1111111101010100011101010011111100110001111010001101000101011110000010001111101100010111101101111101001001011000111110011101010001111110111111101000101001" @@ -184,7 +184,7 @@ static void test_examples(int index, int generate, int debug) { "0000000001011000110000101000100110010011011011001110110100001100010010001010001001110111101001100100100001011100110110100001000100100001001001110001010000" "0000000110100111001111010111011001101100100100110001001011110011101101110101110110001000010110011011011110100011001001011110111011011110110110001110101100" }, - /* 3*/ { BARCODE_EAN128_CC, 3, "[01]93812345678901", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "24723:2010 Figure 2 GS1-128 Composite symbol with 5-row CC-C **NOT SAME** ditto as above", + /* 3*/ { BARCODE_GS1_128_CC, 3, "[01]93812345678901", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "24723:2010 Figure 2 GS1-128 Composite symbol with 5-row CC-C **NOT SAME** ditto as above", "1111111101010100011110101011110000111101011001111101110111110111010010000010000100010110010000101100001111011110110011011110101001111000111111101000101001" "1111111101010100011111101010001110100001000111101001100101110010000011100001011000100100100111110110001011100001011111011111101010111000111111101000101001" "1111111101010100011101010011111100110001111010001101000101011110000010001111101100010111101101111101001001011000111110011101010001111110111111101000101001" @@ -248,14 +248,14 @@ static void test_examples(int index, int generate, int debug) { "0001000000000000000000000000000000000000000000000000010" "0001010110011001001100110010011011011110101001110101010" }, - /* 9*/ { BARCODE_RSS14_CC, 1, "0361234567890", "[11]990102", 0, 5, 100, "GGS Figure 5.9.8-5. (24723:2010 Figure 8) GS1 DataBar Omnidirectional symbol with a four-column CC-A", + /* 9*/ { BARCODE_DBAR_OMN_CC, 1, "0361234567890", "[11]990102", 0, 5, 100, "GGS Figure 5.9.8-5. (24723:2010 Figure 8) GS1 DataBar Omnidirectional symbol with a four-column CC-A", "1101101110110000101000110001111001010111100010011101001110011101100110011001001100111000110110001010" "1101101100110111011111001001000011010111111010011001001101000000111010010010111111001110110010001010" "1101101000110010010111110001011001101111000010011001101111010011110010010000011001011100111010001010" "0000000000010110001110100000000101001011010111111011001101010000011010000000010100101000110011110000" "0000010011101001110001001111111000010100101000000100110010101111100101111111100011010111001100001101" }, - /*10*/ { BARCODE_RSS14STACK_CC, 1, "0341234567890", "[17]010200", 0, 9, 56, "GGS Figure 5.9.8-6. (24723:2010 Figure 6) GS1 DataBar Stacked symbol with a two-column CC-A", + /*10*/ { BARCODE_DBAR_STK_CC, 1, "0341234567890", "[17]010200", 0, 9, 56, "GGS Figure 5.9.8-6. (24723:2010 Figure 6) GS1 DataBar Stacked symbol with a two-column CC-A", "01101100110101110011100111101010000100001111011110101001" "01101101110110110001000010001110111101100100011100101001" "01101101100110100001111011001111110011010110011101101001" @@ -266,7 +266,7 @@ static void test_examples(int index, int generate, int debug) { "00000011010111101010000010101010101001001101010000000000" "10101100111000010101111111110111000110110011100101000000" }, - /*11*/ { BARCODE_RSS_LTD_CC, 2, "0351234567890", "[91]abcdefghijklmnopqrstuv", 0, 17, 83, "GGS Figure 5.9.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B **NOT SAME** (using [91] not [21] as length > 20 max for [21])", + /*11*/ { BARCODE_DBAR_LTD_CC, 2, "0351234567890", "[91]abcdefghijklmnopqrstuv", 0, 17, 83, "GGS Figure 5.9.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B **NOT SAME** (using [91] not [21] as length > 20 max for [21])", "11011101001110111110111010010110001001000001000010001011111011010011110110111010010" "11011001001111110101001110010110001101111011000011001010100001111000100110110010010" "11011001101001111000010010010100001101110111001011110011011100100011100110110011010" @@ -285,14 +285,14 @@ static void test_examples(int index, int generate, int debug) { "00000000000001111011100011010001110101010110101001100101110100100111000110101110000" "00000000001010000100011100101110001010101001010110011010001011011000111001010000101" }, - /*12*/ { BARCODE_RSS_EXP_CC, 1, "[01]93712345678904[3103]001234", "[91]1A2B3C4D5E", 0, 5, 151, "GGS Figure 5.9.8-8. (24723:2010 Figure 9) GS1 DataBar Expanded symbol with a four-column CC-A, same, verified against BWIPP and tec-it", + /*12*/ { BARCODE_DBAR_EXP_CC, 1, "[01]93712345678904[3103]001234", "[91]1A2B3C4D5E", 0, 5, 151, "GGS Figure 5.9.8-8. (24723:2010 Figure 9) GS1 DataBar Expanded symbol with a four-column CC-A, same, verified against BWIPP and tec-it", "0011011011101110011010011000011100011100110110100111010011010001000011000101101110011000001101100010100000000000000000000000000000000000000000000000000" "0011011011001101110111110100011010001111001100100110010010111111001001100100101111110011101100100010100000000000000000000000000000000000000000000000000" "0011011010001010111011111100011111011011110010100110011011000011010011110100001011001111101110100010100000000000000000000000000000000000000000000000000" "0000011011111011000100000000101001010000011101001110100110001100111101000010101000011010001110001000100001010000111001010000001010010111000110010110000" "0101100100000100111011111111000010101111100010110001011001110011000010111100000011100101110001110111011110101111000110001111110000101000111001101000010" }, - /*13*/ { BARCODE_EAN128_CC, 1, "[01]03212345678906", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, "GGS Figure 5.9.8-9. (24723:2010 Figure 11) GS1-128 symbol with a four-column CC-A", + /*13*/ { BARCODE_GS1_128_CC, 1, "[01]03212345678906", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, "GGS Figure 5.9.8-9. (24723:2010 Figure 11) GS1-128 symbol with a four-column CC-A", "0000000000000000000001101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010000000000000000000000000" "0000000000000000000001101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010000000000000000000000000" "0000000000000000000001101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010000000000000000000000000" @@ -300,7 +300,7 @@ static void test_examples(int index, int generate, int debug) { "0010110001100001010001001100100110110110011100100011011000100100010100010011101111010011001001000010110011011100010100001000100010010011100010100" "1101001110011110101110110011011001001001100011011100100111011011101011101100010000101100110110111101001100100011101011110111011101101100011101011" }, - /*14*/ { BARCODE_RSS_EXPSTACK_CC, 1, "[01]00012345678905[10]ABCDEF", "[21]12345678", 0, 13, 102, "24723:2010 Figure 10 — A GS1 DataBar Expanded Stacked Composite symbol (with CC-A) **NOT SAME** bottom 1st and top 2nd linear row separators different; zint same as BWIPP and hard to see how figure in standard could be correct", + /*14*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]00012345678905[10]ABCDEF", "[21]12345678", 0, 13, 102, "24723:2010 Figure 10 — A GS1 DataBar Expanded Stacked Composite symbol (with CC-A) **NOT SAME** bottom 1st and top 2nd linear row separators different; zint same as BWIPP and hard to see how figure in standard could be correct", "001101101110110100001000001101001100111011000010011101001000110011100110010100111011100000110110001010" "001101101100101111110100011001111101101000001010011001001011111011011110011010111000100000110010001010" "001101101000100101001111000001000111011101111010011001101011110110110000011010001011111000111010001010" @@ -315,7 +315,7 @@ static void test_examples(int index, int generate, int debug) { "000000111001111101010100001010100101011111000010100000000000000000000000000000000000000000000000000000" "010111000110000010100011110000001010100000111101000100000000000000000000000000000000000000000000000000" }, - /*15*/ { BARCODE_EAN128_CC, 3, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, 7, 174, "24723:2010 Figure 12 — A GS1-128 Composite symbol (with CC-C)", + /*15*/ { BARCODE_GS1_128_CC, 3, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, 7, 174, "24723:2010 Figure 12 — A GS1-128 Composite symbol (with CC-C)", "111111110101010001111010101111000011010111011110000111011111011101001000001000010001011110101100111110111010010001110001000100011000011011111010100111110111111101000101001000" "111111110101010001111110101000111010000100111101000110011110101111101111010001010000011111000110010100111001011100011001001001111101100011111101010111000111111101000101001000" "111111110101010001010100011110000011001111100001010110100010111110001110111101011100011000001101011110101111001000000101100001011111101011101010001111110111111101000101001000" @@ -324,7 +324,7 @@ static void test_examples(int index, int generate, int debug) { "000000000101100011000010100010010011001101101100111001100100110001001000101000100111011110100110010010000100110010011000100100010011101011101000010001000100001010011100010100" "000000011010011100111101011101101100110010010011000110011011001110110111010111011000100001011001101101111011001101100111011011101100010100010111101110111011110101100011101011" }, - /*16*/ { BARCODE_RSS14STACK_CC, 1, "12345678901231", "[91]12345678901234567890", 0, 10, 56, "Example with CC-A 2 cols, 6 rows", + /*16*/ { BARCODE_DBAR_STK_CC, 1, "12345678901231", "[91]12345678901234567890", 0, 10, 56, "Example with CC-A 2 cols, 6 rows", "01100100010111100110100111001011101110001000011100101101" "01110100010110001011101000001000111010111110011000101101" "01110110010110101100111111001000111100001001011000101001" @@ -336,7 +336,7 @@ static void test_examples(int index, int generate, int debug) { "00000110001101011010101010101010101101010000100000000000" "10101001111010000101100000000111000010100111011101000000" }, - /*17*/ { BARCODE_RSS14_OMNI_CC, 1, "12345678901231", "[91]1234567890123456789012", 0, 13, 56, "Example with CC-A 2 cols, 7 rows", + /*17*/ { BARCODE_DBAR_OMNSTK_CC, 1, "12345678901231", "[91]1234567890123456789012", 0, 13, 56, "Example with CC-A 2 cols, 7 rows", "01110110110100100011111001101110001011100110011100010101" "01110010110111000110101111101001111100110010011000010101" "01100010110111010110011110001110001110110011011000110101" @@ -365,7 +365,7 @@ static void test_examples(int index, int generate, int debug) { "0001000000000000000000000000000000000000000000000000010" "0001010010011011110101000110111001000010100100010101010" }, - /*19*/ { BARCODE_RSS14STACK_CC, 1, "12345678901231", "[91]1234567890123456789012345678901", 0, 13, 56, "Example with CC-A 2 cols, 9 rows", + /*19*/ { BARCODE_DBAR_STK_CC, 1, "12345678901231", "[91]1234567890123456789012345678901", 0, 13, 56, "Example with CC-A 2 cols, 9 rows", "01100011010100100011111001101110001011100110011010111101" "01100010010111000110101111101001111100110010011010011101" "01110010010111010110011110001110001110110011011010011001" @@ -380,7 +380,7 @@ static void test_examples(int index, int generate, int debug) { "00000110001101011010101010101010101101010000100000000000" "10101001111010000101100000000111000010100111011101000000" }, - /*20*/ { BARCODE_RSS14_OMNI_CC, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 16, 56, "Example with CC-A 2 cols, 10 rows", + /*20*/ { BARCODE_DBAR_OMNSTK_CC, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 16, 56, "Example with CC-A 2 cols, 10 rows", "01101001000111100110100111001011101110001000011101001101" "01101011000110001011101000001000111010111110011101011101" "01101011100110101100111111001000111100001001011101011001" @@ -416,7 +416,7 @@ static void test_examples(int index, int generate, int debug) { "0001000000000000000000000000000000000000000000000000010" "0001010010011011110101000110111001000010100100010101010" }, - /*22*/ { BARCODE_RSS_LTD_CC, 1, "12345678901231", "[91]1234567890123456789012345", 0, 7, 74, "Example with CC-A 3 cols, 5 rows", + /*22*/ { BARCODE_DBAR_LTD_CC, 1, "12345678901231", "[91]1234567890123456789012345", 0, 7, 74, "Example with CC-A 3 cols, 5 rows", "01111001101001110010011010001011101110001000010111011100100000110000101010" "01000111010111110010111010001110101100100000011001111010111110110001101010" "01011001110111110010110010001101100000101111011100010111110010110001001010" @@ -437,7 +437,7 @@ static void test_examples(int index, int generate, int debug) { "000010000000000000000000000000000000000000000000000000000000000000000010" "000010100110010010011011110101000110101010011101010000100010011100101010" }, - /*24*/ { BARCODE_RSS_LTD_CC, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 9, 74, "Example with CC-A 3 cols, 7 rows", + /*24*/ { BARCODE_DBAR_LTD_CC, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 9, 74, "Example with CC-A 3 cols, 7 rows", "01000100011011111010110100001100011010001111011100011010111110110010100010" "01100000100110111010010100001110101100111100011100011101100110110010110010" "01100101111011000010010110001001000011110001011100010111011000110010111010" @@ -457,7 +457,7 @@ static void test_examples(int index, int generate, int debug) { "000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010" "000101001100100100110111101010001101100010101111010101000100100100011101001110010110011011011001010" }, - /*26*/ { BARCODE_RSS14_CC, 1, "12345678901231", "[91]1234567890123456789012345678", 0, 6, 100, "Example with CC-A 4 cols, 4 rows", + /*26*/ { BARCODE_DBAR_OMN_CC, 1, "12345678901231", "[91]1234567890123456789012345678", 0, 6, 100, "Example with CC-A 4 cols, 4 rows", "1101001000111100110100111001011101110001000010010001101011101110010000011000001001101110111011001010" "1101011000111010110010000001100111101011111010010000101100101111011000011011011110000100110011001010" "1101011100100011111011001001000000100101111010110000101100011111010010011000110101111000110111001010" @@ -465,7 +465,7 @@ static void test_examples(int index, int generate, int debug) { "0000000001100011000110101000000001001011011100001001010110000101111010010101010000111101011000100000" "0000010010011100111001000111111110010100100011110110101001111010000101100000000111000010100111011101" }, - /*27*/ { BARCODE_RSS_EXP_CC, 1, "[01]12345678901231", "[91]1234567890123456789012345678901234567", 0, 7, 134, "Example with CC-A 4 cols, 5 rows", + /*27*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[91]1234567890123456789012345678901234567", 0, 7, 134, "Example with CC-A 4 cols, 5 rows", "00110101111011110011010011100101110111000100001011100010101110111001000001100000100110111011011110101000000000000000000000000000000000" "00110100111011101011001000000110011110101111101011100110110010111101100001001000011110001011001110101000000000000000000000000000000000" "00110100110010001101001110000110001010011111001011100100101111100001100101000111100010100011101110101000000000000000000000000000000000" @@ -474,7 +474,7 @@ static void test_examples(int index, int generate, int debug) { "00001011100111110001000000001010010011000000101001100011100100111011010000101010000111000011110101001101011110000010010100000010100000" "01010100011000001110111111110000101100111111010110011100011011000100101111000000111000111100001010110010100001111101100011111100001010" }, - /*28*/ { BARCODE_RSS_EXPSTACK_CC, 1, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345", 0, 12, 102, "Example with CC-A 4 cols, 6 rows", + /*28*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345", 0, 12, 102, "Example with CC-A 4 cols, 6 rows", "001100010110111100110100111001011101110001000010011100101011101110010000011000001001101110110101111010" "001100010100111010110010000001100111101011111010011110101100101111011000010010000111100010110100111010" "001100110100100011010011100001100010100111110010111110101011111000011001010001111000101000110100110010" @@ -515,7 +515,7 @@ static void test_examples(int index, int generate, int debug) { "0001000000000000000000000000000000000000000000000000010" "0001010010011011110101000110111001000010100100010101010" }, - /*31*/ { BARCODE_RSS14STACK_CC, 2, "12345678901231", "[91]123456789012345678901234567", 0, 15, 56, "Example with CC-B 2 cols, 11 rows", + /*31*/ { BARCODE_DBAR_STK_CC, 2, "12345678901231", "[91]123456789012345678901234567", 0, 15, 56, "Example with CC-B 2 cols, 11 rows", "01100100010111011111011101001000001000010001011100110101" "01110100010110100001111011001100101110000100011110110101" "01110110010101100100111000001011111011000001011110010101" @@ -532,7 +532,7 @@ static void test_examples(int index, int generate, int debug) { "00000110001101011010101010101010101101010000100000000000" "10101001111010000101100000000111000010100111011101000000" }, - /*32*/ { BARCODE_RSS14_OMNI_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123", 0, 20, 56, "Example with CC-B 2 cols, 14 rows", + /*32*/ { BARCODE_DBAR_OMNSTK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123", 0, 20, 56, "Example with CC-B 2 cols, 14 rows", "01110111010100011111010011101101111110101110011101110101" "01110011010100100101111000001001000100001111011100110101" "01111011010101101111001110001111011110101000011110110101" @@ -577,7 +577,7 @@ static void test_examples(int index, int generate, int debug) { "0001000000000000000000000000000000000000000000000000010" "0001010010011011110101000110111001000010100100010101010" }, - /*34*/ { BARCODE_RSS14STACK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890", 0, 24, 56, "Example with CC-B 2 cols, 20 rows", + /*34*/ { BARCODE_DBAR_STK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890", 0, 24, 56, "Example with CC-B 2 cols, 20 rows", "01111010100111011111011101001000001000010001011110101001" "01110010100110100001111011001100101110000100011100101001" "01110110100101100100111000001011111011000001011101101001" @@ -603,7 +603,7 @@ static void test_examples(int index, int generate, int debug) { "00000110001101011010101010101010101101010000100000000000" "10101001111010000101100000000111000010100111011101000000" }, - /*35*/ { BARCODE_RSS14_OMNI_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 29, 56, "Example with CC-B 2 cols, 23 rows", + /*35*/ { BARCODE_DBAR_OMNSTK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 29, 56, "Example with CC-B 2 cols, 23 rows", "01110011010100000011100101101100111111011001011110100101" "01111011010111110110100111101110110010000110011110101101" "01111001010111001011001000001110001101110100011110101001" @@ -666,7 +666,7 @@ static void test_examples(int index, int generate, int debug) { "0001000000000000000000000000000000000000000000000000010" "0001010010011011110101000110111001000010100100010101010" }, - /*37*/ { BARCODE_RSS_LTD_CC, 2, "12345678901231", "[91]123456", 0, 8, 83, "Example with CC-B 3 cols, 6 rows", + /*37*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]123456", 0, 8, 83, "Example with CC-B 3 cols, 6 rows", "11001000101110111110111010010110011101000001000010001011101000010001110110010001010" "11101000101110101111011100010010011101010000111100100011010111000000100111010001010" "11101100101100110100001111010011011101101111101000100010110010011100000111011001010" @@ -690,7 +690,7 @@ static void test_examples(int index, int generate, int debug) { "0000000000000010000000000000000000000000000000000000000000000000000000000000000010" "0000000000000010100110010010011011110101000110101010011101010000100010011100101010" }, - /*39*/ { BARCODE_RSS_LTD_CC, 2, "12345678901231", "[91]12345678901234567890123456789", 0, 12, 83, "Example with CC-B 3 cols, 10 rows", + /*39*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]12345678901234567890123456789", 0, 12, 83, "Example with CC-B 3 cols, 10 rows", "11000100101000000111001011010011110101100111111011001010010010111100000110001001010" "11100100101110110010000110010111110101011011110011100011110111101010000111001001010" "11110100101100011101111101010111100101110100011100011011101100111100110111101001010" @@ -722,7 +722,7 @@ static void test_examples(int index, int generate, int debug) { "0000000000000010000000000000000000000000000000000000000000000000000000000000000010" "0000000000000010100110010010011011110101000110101010011101010000100010011100101010" }, - /*41*/ { BARCODE_RSS_LTD_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 17, 83, "Example with CC-B 3 cols, 15 rows", + /*41*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 17, 83, "Example with CC-B 3 cols, 15 rows", "11011101001110111110111010010110001001000001000010001011111011010011110110111010010" "11011001001100101110000100010110001101110010110010000011100011011101000110110010010" "11011001101101111110011010010100001101100101100111111011001100100011110110110011010" @@ -773,7 +773,7 @@ static void test_examples(int index, int generate, int debug) { "0000000000000010000000000000000000000000000000000000000000000000000000000000000010" "0000000000000010100110010010011011110101000110101010011101010000100010011100101010" }, - /*43*/ { BARCODE_RSS_LTD_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901", 0, 46, 83, "Example with CC-B 3 cols, 44 rows", + /*43*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901", 0, 46, 83, "Example with CC-B 3 cols, 44 rows", "11001000101110111110111010010110000101100011100011010011111011010011110110100010010" "11101000101100101110000100010111000101110010110010000011100011011101000110100011010" "11101100101101111110011010010111001101100101100111111011001100100011110110100001010" @@ -843,7 +843,7 @@ static void test_examples(int index, int generate, int debug) { "000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010" "000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010" }, - /*46*/ { BARCODE_EAN128_CC, 2, "[01]12345678901231", "[91]12345678901234567890123456789012345678901", 0, 10, 145, "Example with CC-B 4 cols, 8 rows", + /*46*/ { BARCODE_GS1_128_CC, 2, "[01]12345678901231", "[91]12345678901234567890123456789012345678901", 0, 10, 145, "Example with CC-B 4 cols, 8 rows", "0000000000000000000001100111010111011111011101001000001000010001010000101101111101101001111011101100100001100110011101010000000000000000000000000" "0000000000000000000001110111010111001011001000001110001101110100010000100101100011101111101011101000111000110111011101010000000000000000000000000" "0000000000000000000001110011010110011001000111101001010000111100010000110101011000101110000011111010011101000111001101010000000000000000000000000" @@ -855,7 +855,7 @@ static void test_examples(int index, int generate, int debug) { "0010110001100001010001001100100110100110001101110100111000111010010011110101100100001001010011000110010011100100010100001000101001110011100010100" "1101001110011110101110110011011001011001110010001011000111000101101100001010011011110110101100111001101100011011101011110111010110001100011101011" }, - /*47*/ { BARCODE_RSS14_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 12, 100, "Example with CC-B 4 cols, 10 rows", + /*47*/ { BARCODE_DBAR_OMN_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 12, 100, "Example with CC-B 4 cols, 10 rows", "1100010010100000011100101101100111111011001010011110101001001011110000010010001000011110110001001010" "1110010010101101111001110001111011110101000010111110101100001100101000011111001010111110111001001010" "1111010010111011001111001101110100011000010010111100101001011111011000011111101001011100111101001010" @@ -869,7 +869,7 @@ static void test_examples(int index, int generate, int debug) { "0000000001100011000110101000000001001011011100001001010110000101111010010101010000111101011000100000" "0000010010011100111001000111111110010100100011110110101001111010000101100000000111000010100111011101" }, - /*48*/ { BARCODE_RSS_EXP_CC, 2, "[01]12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123", 0, 14, 134, "Example with CC-B 4 cols, 12 rows", + /*48*/ { BARCODE_DBAR_EXP_CC, 2, "[01]12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123", 0, 14, 134, "Example with CC-B 4 cols, 12 rows", "00111010110011101111101110100100000100001000101011000010111110110100111101110110010000110011101011001000000000000000000000000000000000" "00111010100011100101100100000111000110111010001011100010110001110111110101110100011100011011101010001000000000000000000000000000000000" "00110010100011001100100011110100101000011110001011100110101100010111000001111101001110100011001010001000000000000000000000000000000000" @@ -885,7 +885,7 @@ static void test_examples(int index, int generate, int debug) { "00001011100111110001000000001010010011000000101001100011100100111011010000101010000111000011110101001101011110000010010100000010100000" "01010100011000001110111111110000101100111111010110011100011011000100101111000000111000111100001010110010100001111101100011111100001010" }, - /*49*/ { BARCODE_RSS_EXPSTACK_CC, 2, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890123456789012345678901234567890123456", 0, 26, 102, "Example with CC-B 4 cols, 20 rows", + /*49*/ { BARCODE_DBAR_EXPSTK_CC, 2, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890123456789012345678901234567890123456", 0, 26, 102, "Example with CC-B 4 cols, 20 rows", "001100100010111011111011101001000001000010001010111100101111101101001111011101100100001100111001011010" "001110100010111001011001000001110001101110100010111101101100011101111101011101000111000110110001011010" "001110110010110011001000111101001010000111100010011101101011000101110000011111010011101000110001010010" @@ -963,7 +963,7 @@ static void test_examples(int index, int generate, int debug) { "000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010" "000101001100100100110111101010001101100010101111010101000100100100011101001110010110011011011001010" }, - /*51*/ { BARCODE_EAN128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567", 0, 32, 154, "Example with CC-C 5 cols, 30 rows", + /*51*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567", 0, 32, 154, "Example with CC-C 5 cols, 30 rows", "1111111101010100010101000001000000101000001000001001110111110111010010000010000100010111110110100111101110110010000110011110101001111000111111101000101001" "1111111101010100011111010100000110111001011001000001110001101110100011000111011111010111010001110001101110110011110011011111010100001100111111101000101001" "1111111101010100011101010011111100100101000011110001011000101110000011111010011101000100010110001111101011100100001100011111101011010000111111101000101001" @@ -997,7 +997,7 @@ static void test_examples(int index, int generate, int debug) { "0000000001011000110000101000100110010011010011000110111010011100011101001001111010110010000100101001100011001001110010100001000101110010001001110001010000" "0000000110100111001111010111011001101100101100111001000101100011100010110110000101001101111011010110011100110110001101011110111010001101110110001110101100" }, - /*52*/ { BARCODE_EAN128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 28, 171, "Example with CC-C 6 cols, 25 rows", + /*52*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 28, 171, "Example with CC-C 6 cols, 25 rows", "111111110101010001101010000110000011010000001001100111011111011101001000001000010001011111011010011110111011001000011001011011110011100011111010100111110111111101000101001" "111111110101010001111010100000100011100011011101000110001110111110101110100011100011011101100111100110111010001100001001001011111011000011110101000010000111111101000101001" "111111110101010001010100011110000011111010011101000100010110001111101011100100001100010011110000010010101100010111000001011010011100000010101000001111000111111101000101001" @@ -1027,7 +1027,7 @@ static void test_examples(int index, int generate, int debug) { "000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000" "000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000" }, - /*53*/ { BARCODE_EAN128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]1234567890123456789012345678901234567890", 0, 32, 528, "Example with CC-C 27 cols, 30 rows", + /*53*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]1234567890123456789012345678901234567890", 0, 32, 528, "Example with CC-C 27 cols, 30 rows", "111111110101010001010100000100000010000100001000010111011111011101001000001000010001011111011010011110111011001000011001011011110011100011110111101010000110000110010100001111100101011111010001011000110000101000001100011001100100010000110011010011110111110101100011000010001100110110110000011111011110010110110010001000011001001011100011100011001000010011000100010110000011001000100001000001011011110011101000100001001000010001111101101001111010111001110010000111101001001111001001000010010000011101011100111110111111101000101001" "111111110101010001111010110011000010010000111101000101000001111010001111110101000111011100110011101000101111010111100001111000100110110011111101001001110111001101110010001001100111110001010101111000010000111100100011011001011010011111100011110011011010000100111011111101001111100110110011010001110100111110111010000111011001001110100111110011000110111101000110000100001110101000111001011111010101111100110000111110001010110001110000001011001011111011010000100100000100011110101101011100000100011111010100001100111111101000101001" "111111110101010001111110101110011010001111011101110110001110100111001100011000101111011110111010111110110010001001111101110011111001011010110100000111000100010000010111101000110100000111011111101001100100111110100111000101011100010001100011101110101111000110010010001111101001001000001111011101101011111000101100000110111101000111101000010011011101000011100100110110111100001100010010111110011101101111110100100111100011011001000111001000011011001001101111110111010111111011001110011110010111011111101011000100111111101000101001" @@ -1061,7 +1061,7 @@ static void test_examples(int index, int generate, int debug) { "000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /*54*/ { BARCODE_EAN128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)", + /*54*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)", "111111110101010001010100000100000010001110111000100111011111011101001100011100011010011111011010011110111011001000011001011011110011100011110111101010000110000110010100001111100101011111010001011000110000101000001100011001100100010000110011010011110111110101100011000010001100110110110000011111011110010110110010001000011001001011100011100011001000010011000100010110000011001000100001000001011011110011101000100001001000010001111101101001111010111001110010000111101001001111001001000010010000011100110111011110101101100010000001110101000111000010101111011110000111111101000101001" "111111110101010001111101011011100011100110011101000101111010111100001111000100110110011111101001001110111001101110010001001100111110001010101111000010000111100100011011001011010011111100011110011011010000100111011111101001111100110110011010001110100111110111010000111011001001110100111110011000110111101000110000100001110101000111001011111010101111100110000111110001010110001110000001011001011111011010000100100000100011110101101011100000100010111100010111100100010000111101001001101111110110011111011001100110111001011100110001110000010011001011111010100001100111111101000101001" "111111110101010001010111000111111010110100000111000100010000010111101000110100000111011111101001100100111110100111000101011100010001100011101110101111000110010010001111101001001000001111011101101011111000101100000110111101000111101000010011011101000011100100110110111100001100010010111110011101101111110100100111100011011001000111001000011011001001101111110111010111111011001110011110010111010011110001100110101110000010110001011000001001110010110110000111100100001000010111101101100110011111010101101111100000100101110011111101000011001000111011111101011001000111111101000101001" @@ -1095,7 +1095,7 @@ static void test_examples(int index, int generate, int debug) { "000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /*55*/ { BARCODE_EAN128_CC, 3, "[01]12345678901231", "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[97]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[98]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[99]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)", + /*55*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[97]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[98]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[99]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)", "111111110101010001010100000100000010001110111000100111011111011101001100011100011010011111011010011110110100100110000001001100110100000011001100100100000100011000001101001011001100001000010001100001100010100001011000001101110111101101000010000010100001000100100001100110001011000111000011010011000001100010111011001000011001110110100000110010001010000001000100011000110000101100110000100001011110110101110000111011001000110001100100010110000011101100101100000100101110111000001100001011001110011000010000100110110010000100110001110011101000010010101111011110000111111101000101001" "111111110101010001111101011011100011010001110000100111010001100010001010011111101110011111011001100110111010000011010001111010001000100011111101110110110111100110110010001111001011000011011110001000100010101110011011111101111110011010011011110000101000010111100100100001001110100111101110010001000111100100111101011101110001110101111000111011111101100101100100010011110100001110001000110010011111100010101110101101111100001001111001010000100011110101100110000111010000111011001111101100010100011000100011110110111111011010001101111101100000101011111010100001100111111101000101001" "111111110101010001010111000111111010010111011111100100001101000011101111110110011101011101011111000100110110001001111001001110011001110010011000011011110111001111100101101110110001011111010010010111100000110001101011110001101110101110000010010110001111100101001011110000001101000100111110011100110100111110111010111110000101101110011001111011100100011111010110111111001100101010010011110000011101011111010000110011000101111001001001100011111010001110110001110111001110101111001110111111010010010000011010011100110111000101110001100111000101110011111101011001000111111101000101001" @@ -1461,7 +1461,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { }; // Verified via bwipp_dump.ps against BWIPP except where noted, when shift verified manually (tec-it.com seems to be off by 2 for top shifts > 1) struct item data[] = { - /* 0*/ { BARCODE_EAN128_CC, -1, "[91]1", "[21]A1B2C3D4E5F6G7H8", 0, 6, 100, 0, "CC-A alignment, bottom shift 10, **NOT SAME** as BWIPP, Start B whereas BWIPP uses Start C, codeword count the same", + /* 0*/ { BARCODE_GS1_128_CC, -1, "[91]1", "[21]A1B2C3D4E5F6G7H8", 0, 6, 100, 0, "CC-A alignment, bottom shift 10, **NOT SAME** as BWIPP, Start B whereas BWIPP uses Start C, codeword count the same", "1101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010" "1101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010" "1101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010" @@ -1469,7 +1469,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { "0000000000001011011110000101000100011010011011000110010110001100101000100001010001110010011100010100" "0000000000110100100001111010111011100101100100111001101001110011010111011110101110001101100011101011" }, - /* 1*/ { BARCODE_EAN128_CC, -1, "[91]12", "[21]A1B2C3D4E5F6G7H8", 0, 6, 99, 1, "CC-A alignment, bottom shift 12", + /* 1*/ { BARCODE_GS1_128_CC, -1, "[91]12", "[21]A1B2C3D4E5F6G7H8", 0, 6, 99, 1, "CC-A alignment, bottom shift 12", "110100100011010000100000110110101111011111001001000110101000001001000001110111010001000011101100101" "110101100011010111100110000111101000110110001001000010111100001100110101110010110000100011001100101" "110101110010001100110011110101100010111000001011000010100110011001111001101111001100111011011100101" @@ -1477,7 +1477,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { "000000000000001011000110000101000100001001001010011000110001010000101110110011001110001010000000000" "000000000000110100111001111010111011110110110101100111001110101111010001001100110001110101100000000" }, - /* 2*/ { BARCODE_EAN128_CC, -1, "[91]123", "[21]A1B2C3D4E5F6G7H8", 0, 6, 101, 1, "CC-A alignment, top shift 1", + /* 2*/ { BARCODE_GS1_128_CC, -1, "[91]123", "[21]A1B2C3D4E5F6G7H8", 0, 6, 101, 1, "CC-A alignment, top shift 1", "01101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010" "01101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010" "01101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010" @@ -1485,7 +1485,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { "00101100011000010100010000100100101001100011010000100010011010001101000100001011001111010011100010100" "11010011100111101011101111011011010110011100101111011101100101110010111011110100110000101100011101011" }, - /* 3*/ { BARCODE_EAN128_CC, -1, "[91]12345", "[21]A1B2C3D4E5F6G7H8", 0, 6, 112, 1, "CC-A alignment, top shift 12", + /* 3*/ { BARCODE_GS1_128_CC, -1, "[91]12345", "[21]A1B2C3D4E5F6G7H8", 0, 6, 112, 1, "CC-A alignment, top shift 12", "0000000000001101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010" "0000000000001101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010" "0000000000001101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010" @@ -1493,7 +1493,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { "0010110001100001010001000010010010100110001101110100111010000100010010001101101000100001000110110010011100010100" "1101001110011110101110111101101101011001110010001011000101111011101101110010010111011110111001001101100011101011" }, - /* 4*/ { BARCODE_EAN128_CC, -1, "[91]1234567", "[21]A1B2C3D4E5F6G7H8", 0, 6, 123, 1, "CC-A alignment, top shift 10", + /* 4*/ { BARCODE_GS1_128_CC, -1, "[91]1234567", "[21]A1B2C3D4E5F6G7H8", 0, 6, 123, 1, "CC-A alignment, top shift 10", "000000000011010010001101000010000011011010111101111100100100011010100000100100000111011101000100001110110010100000000000000" "000000000011010110001101011110011000011110100011011000100100001011110000110011010111001011000010001100110010100000000000000" "000000000011010111001000110011001111010110001011100000101100001010011001100111100110111100110011101101110010100000000000000" @@ -1501,7 +1501,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { "001011000110000101000100001001001010011000110111010011100011101001010000100010001001000101000100001000110100110011100010100" "110100111001111010111011110110110101100111001000101100011100010110101111011101110110111010111011110111001011001100011101011" }, - /* 5*/ { BARCODE_EAN128_CC, -1, "[91]123456789", "[21]A1B2C3D4E5F6G7H8", 0, 6, 134, 1, "CC-A alignment, top shift 21", + /* 5*/ { BARCODE_GS1_128_CC, -1, "[91]123456789", "[21]A1B2C3D4E5F6G7H8", 0, 6, 134, 1, "CC-A alignment, top shift 21", "00000000000000000000011010010001101000010000011011010111101111100100100011010100000100100000111011101000100001110110010100000000000000" "00000000000000000000011010110001101011110011000011110100011011000100100001011110000110011010111001011000010001100110010100000000000000" "00000000000000000000011010111001000110011001111010110001011100000101100001010011001100111100110111100110011101101110010100000000000000" @@ -1509,7 +1509,7 @@ static void test_ean128_cc_shift(int index, int generate, int debug) { "00101100011000010100010000100100101001100011011101001110001110100100111101011010000100010001101001101000100001001101110110011100010100" "11010011100111101011101111011011010110011100100010110001110001011011000010100101111011101110010110010111011110110010001001100011101011" }, - /* 6*/ { BARCODE_EAN128_CC, -1, "[91]12345678901", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, 1, "CC-A alignment, top shift 21", + /* 6*/ { BARCODE_GS1_128_CC, -1, "[91]12345678901", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, 1, "CC-A alignment, top shift 21", "0000000000000000000001101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010000000000000000000000000" "0000000000000000000001101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010000000000000000000000000" "0000000000000000000001101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010000000000000000000000000" @@ -1614,7 +1614,7 @@ static void test_ean128_cc_width(int index, int generate, int debug) { struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - symbol->symbology = BARCODE_EAN128_CC; + symbol->symbology = BARCODE_GS1_128_CC; symbol->option_1 = 3; symbol->debug |= debug; diff --git a/backend/tests/test_eci.c b/backend/tests/test_eci.c index aacd1c8a..137a289d 100644 --- a/backend/tests/test_eci.c +++ b/backend/tests/test_eci.c @@ -133,7 +133,7 @@ static void test_reduced_charset_input(int index, int debug) { // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { /* 0*/ { BARCODE_CODE11, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII subset only" }, - /* 1*/ { BARCODE_C25MATRIX, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers only" }, + /* 1*/ { BARCODE_C25STANDARD, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers only" }, /* 2*/ { BARCODE_CODE39, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII subset only" }, /* 3*/ { BARCODE_EXCODE39, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII only" }, /* 4*/ { BARCODE_EANX, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers only" }, @@ -148,8 +148,8 @@ static void test_reduced_charset_input(int index, int debug) { /* 13*/ { BARCODE_CODE49, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII only" }, /* 14*/ { BARCODE_CODE93, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII subset only" }, /* 15*/ { BARCODE_FLAT, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers only" }, - /* 16*/ { BARCODE_RSS14, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers only" }, - /* 17*/ { BARCODE_RSS_EXP, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII subset only" }, + /* 16*/ { BARCODE_DBAR_OMN, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers only" }, + /* 17*/ { BARCODE_DBAR_EXP, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII subset only" }, /* 18*/ { BARCODE_LOGMARS, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "ASCII subset only" }, /* 19*/ { BARCODE_PDF417, UNICODE_MODE, 0, "é", 0, 0, "" }, /* 20*/ { BARCODE_PDF417, UNICODE_MODE, 3, "é", 0, 3, "Supports ECI" }, @@ -193,7 +193,7 @@ static void test_reduced_charset_input(int index, int debug) { /* 58*/ { BARCODE_MICROPDF417, UNICODE_MODE, 0, "β", ZINT_WARN_USES_ECI, 9, "" }, /* 59*/ { BARCODE_MICROPDF417, UNICODE_MODE, 9, "β", 0, 9, "" }, /* 60*/ { BARCODE_MICROPDF417, UNICODE_MODE, 26, "テ", 0, 26, "" }, - /* 61*/ { BARCODE_ONECODE, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers/dash only" }, + /* 61*/ { BARCODE_USPS_IMAIL, UNICODE_MODE, 0, "é", ZINT_ERROR_INVALID_DATA, -1, "Numbers/dash only" }, /* 62*/ { BARCODE_AZTEC, UNICODE_MODE, 0, "é", 0, 0, "" }, /* 63*/ { BARCODE_AZTEC, UNICODE_MODE, 3, "é", 0, 3, "Supports ECI" }, /* 64*/ { BARCODE_AZTEC, UNICODE_MODE, 0, "β", ZINT_WARN_USES_ECI, 9, "" }, diff --git a/backend/tests/test_gs1.c b/backend/tests/test_gs1.c index 7b95e953..8e2794af 100644 --- a/backend/tests/test_gs1.c +++ b/backend/tests/test_gs1.c @@ -52,31 +52,31 @@ static void test_gs1_reduce(int index, int generate, int debug) { unsigned char *expected; }; struct item data[] = { - /* 0*/ { BARCODE_EAN128, -1, "12345678901234", "", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, - /* 1*/ { BARCODE_EAN128, -1, "[01]12345678901234", "", 0, "Input mode ignored; verified manually against tec-it", + /* 0*/ { BARCODE_GS1_128, -1, "12345678901234", "", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, + /* 1*/ { BARCODE_GS1_128, -1, "[01]12345678901234", "", 0, "Input mode ignored; verified manually against tec-it", "11010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110010001011000111010111101100011101011" }, - /* 2*/ { BARCODE_EAN128, GS1_MODE, "[01]12345678901234", "", 0, "Input mode ignored", + /* 2*/ { BARCODE_GS1_128, GS1_MODE, "[01]12345678901234", "", 0, "Input mode ignored", "11010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110010001011000111010111101100011101011" }, - /* 3*/ { BARCODE_EAN128, UNICODE_MODE, "[01]12345678901234", "", 0, "Input mode ignored", + /* 3*/ { BARCODE_GS1_128, UNICODE_MODE, "[01]12345678901234", "", 0, "Input mode ignored", "11010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110010001011000111010111101100011101011" }, - /* 4*/ { BARCODE_EAN128_CC, -1, "[01]12345678901234", "[21]1234", 0, "Input mode ignored", + /* 4*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901234", "[21]1234", 0, "Input mode ignored", "0000000000000000000001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010000000000000000000000000" "0000000000000000000001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010000000000000000000000000" "0000000000000000000001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010000000000000000000000000" "0010110001100001010001001100100110100110001101110100111000111010010011110101100100001001010011000110111010011100010100001011010000110011100010100" "1101001110011110101110110011011001011001110010001011000111000101101100001010011011110110101100111001000101100011101011110100101111001100011101011" }, - /* 5*/ { BARCODE_EAN128_CC, GS1_MODE, "[01]12345678901234", "[21]1234", 0, "Input mode ignored", + /* 5*/ { BARCODE_GS1_128_CC, GS1_MODE, "[01]12345678901234", "[21]1234", 0, "Input mode ignored", "0000000000000000000001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010000000000000000000000000" "0000000000000000000001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010000000000000000000000000" "0000000000000000000001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010000000000000000000000000" "0010110001100001010001001100100110100110001101110100111000111010010011110101100100001001010011000110111010011100010100001011010000110011100010100" "1101001110011110101110110011011001011001110010001011000111000101101100001010011011110110101100111001000101100011101011110100101111001100011101011" }, - /* 6*/ { BARCODE_EAN128_CC, UNICODE_MODE, "[01]12345678901234", "[21]1234", 0, "Input mode ignored", + /* 6*/ { BARCODE_GS1_128_CC, UNICODE_MODE, "[01]12345678901234", "[21]1234", 0, "Input mode ignored", "0000000000000000000001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010000000000000000000000000" "0000000000000000000001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010000000000000000000000000" "0000000000000000000001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010000000000000000000000000" @@ -101,63 +101,63 @@ static void test_gs1_reduce(int index, int generate, int debug) { /*12*/ { BARCODE_NVE18, UNICODE_MODE, "12345678901234567", "", 0, "Input mode ignored", "110100111001111010111011011001100101100111001000101100011100010110110000101001101111011010110011100100010110001110001011011000010010101101110001100011101011" }, - /*13*/ { BARCODE_RSS_EXP, -1, "2012", "", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, - /*14*/ { BARCODE_RSS_EXP, -1, "[20]12", "", 0, "Input mode ignored", + /*13*/ { BARCODE_DBAR_EXP, -1, "2012", "", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, + /*14*/ { BARCODE_DBAR_EXP, -1, "[20]12", "", 0, "Input mode ignored", "010010000010000101101111111100001010000010000110010101111100101110001011110000000010101111100001011101" }, - /*15*/ { BARCODE_RSS_EXP, GS1_MODE, "[20]12", "", 0, "Input mode ignored", + /*15*/ { BARCODE_DBAR_EXP, GS1_MODE, "[20]12", "", 0, "Input mode ignored", "010010000010000101101111111100001010000010000110010101111100101110001011110000000010101111100001011101" }, - /*16*/ { BARCODE_RSS_EXP, UNICODE_MODE, "[20]12", "", 0, "Input mode ignored", + /*16*/ { BARCODE_DBAR_EXP, UNICODE_MODE, "[20]12", "", 0, "Input mode ignored", "010010000010000101101111111100001010000010000110010101111100101110001011110000000010101111100001011101" }, - /*17*/ { BARCODE_RSS_EXP_CC, -1, "[20]12", "[21]1234", 0, "Input mode ignored; verified manually against tec-it", + /*17*/ { BARCODE_DBAR_EXP_CC, -1, "[20]12", "[21]1234", 0, "Input mode ignored; verified manually against tec-it", "001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010" "001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010" "001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010" "000001111111010110010000000010100100111001100001011010000011010001110100001010101001010000011110100000" "010010000000101001101111111100001011000110011110100101111100101110001011110000000010101111100001011101" }, - /*18*/ { BARCODE_RSS_EXP_CC, GS1_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", + /*18*/ { BARCODE_DBAR_EXP_CC, GS1_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", "001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010" "001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010" "001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010" "000001111111010110010000000010100100111001100001011010000011010001110100001010101001010000011110100000" "010010000000101001101111111100001011000110011110100101111100101110001011110000000010101111100001011101" }, - /*19*/ { BARCODE_RSS_EXP_CC, UNICODE_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", + /*19*/ { BARCODE_DBAR_EXP_CC, UNICODE_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", "001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010" "001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010" "001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010" "000001111111010110010000000010100100111001100001011010000011010001110100001010101001010000011110100000" "010010000000101001101111111100001011000110011110100101111100101110001011110000000010101111100001011101" }, - /*20*/ { BARCODE_RSS_EXPSTACK, -1, "12", "", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, - /*21*/ { BARCODE_RSS_EXPSTACK, -1, "[20]12", "", 0, "Input mode ignored", + /*20*/ { BARCODE_DBAR_EXPSTK, -1, "12", "", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, + /*21*/ { BARCODE_DBAR_EXPSTK, -1, "[20]12", "", 0, "Input mode ignored", "010010000010000101101111111100001010000010000110010101111100101110001011110000000010101111100001011101" }, - /*22*/ { BARCODE_RSS_EXPSTACK, GS1_MODE, "[20]12", "", 0, "Input mode ignored", + /*22*/ { BARCODE_DBAR_EXPSTK, GS1_MODE, "[20]12", "", 0, "Input mode ignored", "010010000010000101101111111100001010000010000110010101111100101110001011110000000010101111100001011101" }, - /*23*/ { BARCODE_RSS_EXPSTACK, UNICODE_MODE, "[20]12", "", 0, "Input mode ignored", + /*23*/ { BARCODE_DBAR_EXPSTK, UNICODE_MODE, "[20]12", "", 0, "Input mode ignored", "010010000010000101101111111100001010000010000110010101111100101110001011110000000010101111100001011101" }, - /*24*/ { BARCODE_RSS_EXPSTACK_CC, -1, "12", "[21]1234", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, - /*25*/ { BARCODE_RSS_EXPSTACK_CC, -1, "[20]12", "[21]1234", 0, "Input mode ignored; verified manually against tec-it (same as BARCODE_RSS_EXP_CC above)", + /*24*/ { BARCODE_DBAR_EXPSTK_CC, -1, "12", "[21]1234", ZINT_ERROR_INVALID_DATA, "GS1 data required", "" }, + /*25*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[20]12", "[21]1234", 0, "Input mode ignored; verified manually against tec-it (same as BARCODE_DBAR_EXP_CC above)", "001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010" "001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010" "001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010" "000001111111010110010000000010100100111001100001011010000011010001110100001010101001010000011110100000" "010010000000101001101111111100001011000110011110100101111100101110001011110000000010101111100001011101" }, - /*26*/ { BARCODE_RSS_EXPSTACK_CC, GS1_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", + /*26*/ { BARCODE_DBAR_EXPSTK_CC, GS1_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", "001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010" "001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010" "001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010" "000001111111010110010000000010100100111001100001011010000011010001110100001010101001010000011110100000" "010010000000101001101111111100001011000110011110100101111100101110001011110000000010101111100001011101" }, - /*27*/ { BARCODE_RSS_EXPSTACK_CC, UNICODE_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", + /*27*/ { BARCODE_DBAR_EXPSTK_CC, UNICODE_MODE, "[20]12", "[21]1234", 0, "Input mode ignored", "001101101110110100001000001101001100111011000010011101001100001010001100010010011011000000110110001010" "001101101100111110100010011001101011100100000010011001001001111001011110011101011001000000110010001010" "001101101000101111100110000101001111010000001010011001101011101110011110010011110110000110111010001010" @@ -244,14 +244,14 @@ static void test_hrt(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_EAN128, "[01]12345678901234[20]12", "", "(01)12345678901234(20)12" }, - /* 1*/ { BARCODE_EAN128_CC, "[01]12345678901234[20]12", "[21]12345", "(01)12345678901234(20)12" }, + /* 0*/ { BARCODE_GS1_128, "[01]12345678901234[20]12", "", "(01)12345678901234(20)12" }, + /* 1*/ { BARCODE_GS1_128_CC, "[01]12345678901234[20]12", "[21]12345", "(01)12345678901234(20)12" }, /* 2*/ { BARCODE_EAN14, "1234567890123", "", "(01)12345678901231" }, /* 3*/ { BARCODE_NVE18, "12345678901234567", "", "(00)123456789012345675" }, - /* 4*/ { BARCODE_RSS_EXP, "[01]12345678901234[20]12", "", "(01)12345678901234(20)12" }, - /* 5*/ { BARCODE_RSS_EXP_CC, "[01]12345678901234", "[21]12345", "(01)12345678901234" }, - /* 6*/ { BARCODE_RSS_EXPSTACK, "[01]12345678901234[20]12", "", "" }, - /* 7*/ { BARCODE_RSS_EXPSTACK_CC, "[01]12345678901234[20]12", "[21]12345", "" }, + /* 4*/ { BARCODE_DBAR_EXP, "[01]12345678901234[20]12", "", "(01)12345678901234(20)12" }, + /* 5*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901234", "[21]12345", "(01)12345678901234" }, + /* 6*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901234[20]12", "", "" }, + /* 7*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901234[20]12", "[21]12345", "" }, }; int data_size = sizeof(data) / sizeof(struct item); diff --git a/backend/tests/test_imail.c b/backend/tests/test_imail.c index 16d57b2f..4e0fd18f 100644 --- a/backend/tests/test_imail.c +++ b/backend/tests/test_imail.c @@ -98,7 +98,7 @@ static void test_csv(int index, int debug) { struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - symbol->symbology = BARCODE_ONECODE; + symbol->symbology = BARCODE_USPS_IMAIL; symbol->debug |= debug; ret = ZBarcode_Encode(symbol, data, strlen(data)); @@ -148,7 +148,7 @@ static void test_hrt(int index, int debug) { struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - int length = testUtilSetSymbol(symbol, BARCODE_ONECODE, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); + int length = testUtilSetSymbol(symbol, BARCODE_USPS_IMAIL, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); ret = ZBarcode_Encode(symbol, data[i].data, length); assert_zero(ret, "i:%d ZBarcode_Encode ret %d != 0 %s\n", i, ret, symbol->errtxt); @@ -197,7 +197,7 @@ static void test_input(int index, int debug) { struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - int length = testUtilSetSymbol(symbol, BARCODE_ONECODE, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); + int length = testUtilSetSymbol(symbol, BARCODE_USPS_IMAIL, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); ret = ZBarcode_Encode(symbol, data[i].data, length); assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); @@ -245,7 +245,7 @@ static void test_encode(int index, int generate, int debug) { struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - int length = testUtilSetSymbol(symbol, BARCODE_ONECODE, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); + int length = testUtilSetSymbol(symbol, BARCODE_USPS_IMAIL, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug); ret = ZBarcode_Encode(symbol, data[i].data, length); assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); diff --git a/backend/tests/test_library.c b/backend/tests/test_library.c index 93591377..27fcfc69 100644 --- a/backend/tests/test_library.c +++ b/backend/tests/test_library.c @@ -58,10 +58,10 @@ static void test_checks(int index, int debug) { /* 3*/ { BARCODE_QRCODE, "1234", -1, -1, 999999 + 1, -1, ZINT_ERROR_INVALID_OPTION, "Error 218: Invalid ECI mode" }, /* 4*/ { BARCODE_CODE128, "1234", -1, -1, -1, 20.1, ZINT_ERROR_INVALID_OPTION, "Error 221: Invalid dot size" }, /* 5*/ { BARCODE_CODE128, "1234", -1, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 220: Selected symbology does not support GS1 mode" }, - /* 6*/ { BARCODE_EAN128, "[21]12\0004", 8, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 262: NUL characters not permitted in GS1 mode" }, - /* 7*/ { BARCODE_EAN128, "[21]12é4", -1, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, - /* 8*/ { BARCODE_EAN128, "[21]12\0074", -1, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 251: Control characters are not supported by GS1" }, - /* 9*/ { BARCODE_EAN128, "[21]1234", -1, GS1_MODE, -1, -1, 0, "" }, + /* 6*/ { BARCODE_GS1_128, "[21]12\0004", 8, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 262: NUL characters not permitted in GS1 mode" }, + /* 7*/ { BARCODE_GS1_128, "[21]12é4", -1, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, + /* 8*/ { BARCODE_GS1_128, "[21]12\0074", -1, GS1_MODE, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 251: Control characters are not supported by GS1" }, + /* 9*/ { BARCODE_GS1_128, "[21]1234", -1, GS1_MODE, -1, -1, 0, "" }, }; int data_size = sizeof(data) / sizeof(struct item); diff --git a/backend/tests/test_raster.c b/backend/tests/test_raster.c index c5c58685..8365b8e4 100644 --- a/backend/tests/test_raster.c +++ b/backend/tests/test_raster.c @@ -117,7 +117,7 @@ static void test_buffer(int index, int generate, int debug) { }; struct item data[] = { /* 0*/ { BARCODE_CODE11, "0000000000", "", 50, 1, 99, 198, 118 }, - /* 1*/ { BARCODE_C25MATRIX, "0000000000", "", 50, 1, 117, 234, 118 }, + /* 1*/ { BARCODE_C25STANDARD, "0000000000", "", 50, 1, 117, 234, 118 }, /* 2*/ { BARCODE_C25INTER, "0000000000", "", 50, 1, 99, 198, 118 }, /* 3*/ { BARCODE_C25IATA, "0000000000", "", 50, 1, 149, 298, 118 }, /* 4*/ { BARCODE_C25LOGIC, "0000000000", "", 50, 1, 109, 218, 118 }, @@ -140,7 +140,7 @@ static void test_buffer(int index, int generate, int debug) { /* 21*/ { BARCODE_EANX_CHK, "1234", "", 50, 1, 47, 118, 118 }, /* 22*/ { BARCODE_EANX, "12", "", 50, 1, 20, 64, 118 }, /* 23*/ { BARCODE_EANX_CHK, "12", "", 50, 1, 20, 64, 118 }, - /* 24*/ { BARCODE_EAN128, "[01]12345678901234", "", 50, 1, 134, 268, 118 }, + /* 24*/ { BARCODE_GS1_128, "[01]12345678901234", "", 50, 1, 134, 268, 118 }, /* 25*/ { BARCODE_CODABAR, "A00000000B", "", 50, 1, 102, 204, 118 }, /* 26*/ { BARCODE_CODE128, "0000000000", "", 50, 1, 90, 180, 118 }, /* 27*/ { BARCODE_DPLEIT, "1234567890123", "", 50, 1, 135, 270, 118 }, @@ -149,9 +149,9 @@ static void test_buffer(int index, int generate, int debug) { /* 30*/ { BARCODE_CODE49, "0000000000", "", 20, 2, 70, 162, 44 }, /* 31*/ { BARCODE_CODE93, "0000000000", "", 50, 1, 127, 254, 118 }, /* 32*/ { BARCODE_FLAT, "1234567890", "", 50, 1, 90, 180, 100 }, - /* 33*/ { BARCODE_RSS14, "1234567890123", "", 50, 1, 96, 192, 118 }, - /* 34*/ { BARCODE_RSS_LTD, "1234567890123", "", 50, 1, 74, 148, 118 }, - /* 35*/ { BARCODE_RSS_EXP, "[01]12345678901234", "", 34, 1, 134, 268, 86 }, + /* 33*/ { BARCODE_DBAR_OMN, "1234567890123", "", 50, 1, 96, 192, 118 }, + /* 34*/ { BARCODE_DBAR_LTD, "1234567890123", "", 50, 1, 74, 148, 118 }, + /* 35*/ { BARCODE_DBAR_EXP, "[01]12345678901234", "", 34, 1, 134, 268, 86 }, /* 36*/ { BARCODE_TELEPEN, "0000000000", "", 50, 1, 208, 416, 118 }, /* 37*/ { BARCODE_UPCA, "12345678904", "", 50, 1, 95, 226, 118 }, /* 38*/ { BARCODE_UPCA_CHK, "123456789043", "", 50, 1, 95, 226, 118 }, @@ -192,12 +192,12 @@ static void test_buffer(int index, int generate, int debug) { /* 73*/ { BARCODE_NVE18, "12345678901234567", "", 50, 1, 156, 312, 118 }, /* 74*/ { BARCODE_JAPANPOST, "0000000000", "", 8, 3, 133, 266, 16 }, /* 75*/ { BARCODE_KOREAPOST, "123456", "", 50, 1, 167, 334, 118 }, - /* 76*/ { BARCODE_RSS14STACK, "0000000000000", "", 13, 3, 50, 100, 26 }, - /* 77*/ { BARCODE_RSS14STACK_OMNI, "0000000000000", "", 69, 5, 50, 100, 138 }, - /* 78*/ { BARCODE_RSS_EXPSTACK, "[01]12345678901234", "", 71, 5, 102, 204, 142 }, + /* 76*/ { BARCODE_DBAR_STK, "0000000000000", "", 13, 3, 50, 100, 26 }, + /* 77*/ { BARCODE_DBAR_OMNSTK, "0000000000000", "", 69, 5, 50, 100, 138 }, + /* 78*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901234", "", 71, 5, 102, 204, 142 }, /* 79*/ { BARCODE_PLANET, "00000000000", "", 12, 2, 185, 370, 24 }, /* 80*/ { BARCODE_MICROPDF417, "0000000000", "", 12, 6, 82, 164, 24 }, - /* 81*/ { BARCODE_ONECODE, "12345678901234567890", "", 8, 3, 129, 258, 16 }, + /* 81*/ { BARCODE_USPS_IMAIL, "12345678901234567890", "", 8, 3, 129, 258, 16 }, /* 82*/ { BARCODE_PLESSEY, "0000000000", "", 50, 1, 227, 454, 118 }, /* 83*/ { BARCODE_TELEPEN_NUM, "0000000000", "", 50, 1, 128, 256, 118 }, /* 84*/ { BARCODE_ITF14, "0000000000", "", 50, 1, 135, 330, 138 }, @@ -221,19 +221,19 @@ static void test_buffer(int index, int generate, int debug) { /*102*/ { BARCODE_EANX_CC, "123456789012", "[20]01", 50, 7, 99, 234, 118 }, /*103*/ { BARCODE_EANX_CC, "123456789012+12", "[20]01", 50, 7, 126, 284, 118 }, /*104*/ { BARCODE_EANX_CC, "123456789012+12345", "[20]01", 50, 7, 153, 338, 118 }, - /*105*/ { BARCODE_EAN128_CC, "[01]12345678901234", "[20]01", 50, 5, 145, 290, 118 }, - /*106*/ { BARCODE_RSS14_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 60 }, - /*107*/ { BARCODE_RSS_LTD_CC, "1234567890123", "[20]01", 19, 6, 74, 148, 56 }, - /*108*/ { BARCODE_RSS_EXP_CC, "[01]12345678901234", "[20]01", 41, 5, 134, 268, 100 }, + /*105*/ { BARCODE_GS1_128_CC, "[01]12345678901234", "[20]01", 50, 5, 145, 290, 118 }, + /*106*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 60 }, + /*107*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 19, 6, 74, 148, 56 }, + /*108*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901234", "[20]01", 41, 5, 134, 268, 100 }, /*109*/ { BARCODE_UPCA_CC, "12345678901", "[20]01", 50, 7, 99, 234, 118 }, /*110*/ { BARCODE_UPCA_CC, "12345678901+12", "[20]01", 50, 7, 128, 284, 118 }, /*111*/ { BARCODE_UPCA_CC, "12345678901+12345", "[20]01", 50, 7, 155, 338, 118 }, /*112*/ { BARCODE_UPCE_CC, "1234567", "[20]01", 50, 9, 55, 142, 118 }, /*113*/ { BARCODE_UPCE_CC, "1234567+12", "[20]01", 50, 9, 82, 192, 118 }, /*114*/ { BARCODE_UPCE_CC, "1234567+12345", "[20]01", 50, 9, 109, 246, 118 }, - /*115*/ { BARCODE_RSS14STACK_CC, "0000000000000", "[20]01", 24, 9, 56, 112, 48 }, - /*116*/ { BARCODE_RSS14_OMNI_CC, "0000000000000", "[20]01", 80, 11, 56, 112, 160 }, - /*117*/ { BARCODE_RSS_EXPSTACK_CC, "[01]12345678901234", "[20]01", 78, 9, 102, 204, 156 }, + /*115*/ { BARCODE_DBAR_STK_CC, "0000000000000", "[20]01", 24, 9, 56, 112, 48 }, + /*116*/ { BARCODE_DBAR_OMNSTK_CC, "0000000000000", "[20]01", 80, 11, 56, 112, 160 }, + /*117*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901234", "[20]01", 78, 9, 102, 204, 156 }, /*118*/ { BARCODE_CHANNEL, "00", "", 50, 1, 19, 38, 118 }, /*119*/ { BARCODE_CODEONE, "12345678901234567890", "", 22, 22, 22, 44, 44 }, /*120*/ { BARCODE_GRIDMATRIX, "ABC", "", 18, 18, 18, 36, 36 }, diff --git a/backend/tests/test_rss.c b/backend/tests/test_rss.c index 001f32f5..5b869c2a 100644 --- a/backend/tests/test_rss.c +++ b/backend/tests/test_rss.c @@ -49,77 +49,77 @@ static void test_binary_div_modulo_divisor(int index, int generate, int debug) { char *expected; }; struct item data[] = { - /* 0*/ { BARCODE_RSS14, "1234567890123", 100, 30, 1, 96, "010111010010000001001110000000010100001011111010110100011001100101111111110001011011000111000101" }, - /* 1*/ { BARCODE_RSS14, "0000004537076", 100, 30, 1, 96, "010101001000000001000100000000010111111100101010111101111101010101111111110111010100100000000101" }, - /* 2*/ { BARCODE_RSS14, "0000004537077", 100, 30, 1, 96, "010101001000000001000111000000010111111101001010101010110000000101111100000111011111111011010101" }, - /* 3*/ { BARCODE_RSS14, "0000004537078", 100, 30, 1, 96, "010101001000000001000111000000010111111101001010101011010000000101111000000011011111111011010101" }, - /* 4*/ { BARCODE_RSS14, "0000000001596", 100, 30, 1, 96, "010101001000000001001111100000010111111100101010111101111101010101111100000111011111111011010101" }, - /* 5*/ { BARCODE_RSS14, "0000000001597", 100, 30, 1, 96, "010101001000000001011111000000010111111100101010101010110000000101111100000111011111110111010101" }, - /* 6*/ { BARCODE_RSS14, "0000000001598", 100, 30, 1, 96, "010101001000000001011111000000010111111100101010101011010000000101111000000011011111110111010101" }, - /* 7*/ { BARCODE_RSS14, "0000000000000", 100, 30, 1, 96, "010101001000000001000111111110010111111100101010101010110000000101111111110111011111111011010101" }, - /* 8*/ { BARCODE_RSS14, "0000000257117", 100, 30, 1, 96, "010101001000000001001111100000010111111100101010101010110000000101111110000011000111111011010101" }, - /* 9*/ { BARCODE_RSS14, "0000000536592", 100, 30, 1, 96, "010101001000000001000111000000010111111100101010101010110000000101100000000111011101100011110101" }, - /* 10*/ { BARCODE_RSS14, "0000001644132", 100, 30, 1, 96, "010101001000000001001111100000010111111100101010100100001111010101111100000111000001101111010101" }, - /* 11*/ { BARCODE_RSS14, "0000002421052", 100, 30, 1, 96, "010101001000000001011111000000010111111100101010101010110000000101111100000111011100010001101101" }, - /* 12*/ { BARCODE_RSS14, "0000003217955", 100, 30, 1, 96, "010101001000000001000111000000010111111100101010101010110000000101111111000001000000111001010101" }, - /* 13*/ { BARCODE_RSS14, "0000004792584", 100, 30, 1, 96, "010101001000000001000111110000010111111101001010111011111101010101111111110111010110101111111101" }, - /* 14*/ { BARCODE_RSS14, "0000006062184", 100, 30, 1, 96, "010101001000000001000111111110010111111101001010110111111101010101111111110111001010011011111101" }, - /* 15*/ { BARCODE_RSS14, "0000007734882", 100, 30, 1, 96, "010101001000000001000111111110010111111101001010110111000010010101111111000111001010001100111101" }, - /* 16*/ { BARCODE_RSS14, "0000008845782", 100, 30, 1, 96, "010101001000000001011111000000010111111101001010111101111101010101111111000001000010101000011101" }, - /* 17*/ { BARCODE_RSS14, "0000009329661", 100, 30, 1, 96, "010101001000000001001111111000010111111101010010111011111101010101111000000011010110101111111101" }, - /* 18*/ { BARCODE_RSS14, "0000009607386", 100, 30, 1, 96, "010101001000000001011111000000010111111101010010100111001011110101111111110111011100011011110101" }, - /* 19*/ { BARCODE_RSS14, "0000010718286", 100, 30, 1, 96, "010101001000000001000111110000010111111101010010100100001111010101111100000111000001101111010101" }, - /* 20*/ { BARCODE_RSS14, "0000011607006", 100, 30, 1, 96, "010101001000000001000111111110010111111101010010101101000100000101111000000011010011100001101101" }, - /* 21*/ { BARCODE_RSS14, "0004360130997", 100, 30, 1, 96, "010101001000000001000100000000010110010010011110101010110000000101111000000011011111111011010101" }, - /* 22*/ { BARCODE_RSS14, "0004360386504", 100, 30, 1, 96, "010101001000000001000111000000010110010010011110111011111101010101111111100011010110101111111101" }, - /* 23*/ { BARCODE_RSS14, "0009142746747", 100, 30, 1, 96, "010101000100000001000111111110010100111110001010101010110000000101111111000111011101100011110101" }, - /* 24*/ { BARCODE_RSS14, "0012319818547", 100, 30, 1, 96, "010101000100000001000100000000010110001100101000101010110000000101111111000111001100011110010101" }, - /* 25*/ { BARCODE_RSS14, "0013775011335", 100, 30, 1, 96, "010101000100000001000100000000010101001100000110101010110000000101111100000111011111010011100101" }, - /* 26*/ { BARCODE_RSS14, "0018894538190", 100, 30, 1, 96, "010101000010000001000100000000010110100100111100101010110000000101111111110001010001100011110101" }, - /* 27*/ { BARCODE_RSS14, "0021059247735", 100, 30, 1, 96, "010101000010000001000100000000010101000011001100101010110000000101111111100011010110111000001101" }, - /* 28*/ { BARCODE_RSS14, "0024094346235", 100, 30, 1, 96, "010101000001000001000100000000010111010000111010101010110000000101100000000111000110011001101101" }, - /* 29*/ { BARCODE_RSS14, "1995000595035", 100, 30, 1, 96, "010100011011000001001110000000010111010111010000101010110000000101111000000011000110011001101101" }, - /* 30*/ { BARCODE_RSS14, "9999999999999", 100, 30, 1, 96, "010010111011100001000111111110010111101101001110100011111101010101111111000001000111110101011101" }, - /* 31*/ { BARCODE_RSS14_CC, "0000000000000", 100, 30, 5, 100, "0000010010111011100001001110000000010111101101001110110001010111110101111111110001000111110101011101" }, - /* 32*/ { BARCODE_RSS14_CC, "0000729476171", 100, 30, 5, 100, "0000010010111011100001011100000000010111100110100010101010110000000101111111100011011111111011010101" }, - /* 33*/ { BARCODE_RSS14_CC, "0004359674363", 100, 30, 5, 100, "0000010010111011100001011100000000010101110010000100101010110000000101111000000011011101100011110101" }, - /* 34*/ { BARCODE_RSS14_CC, "0009142871421", 100, 30, 5, 100, "0000010010111101000011000111111110010100010111110010101010110000000101111111000111001100011110010101" }, - /* 35*/ { BARCODE_RSS14_CC, "0012319591881", 100, 30, 5, 100, "0000010010111101000011000100000000010101000111010000101010110000000101111111000111011100010001101101" }, - /* 36*/ { BARCODE_RSS14_CC, "6975446373038", 100, 30, 5, 100, "0000010111001110010111001111111000010101000111010000101010110000000101111100000111011111111011010101" }, - /* 37*/ { BARCODE_RSS14_CC, "9999999999999", 100, 30, 5, 100, "0000010110101111011111001111111000010110111100100010100110111001110101111111110001001100110001110101" }, - /* 38*/ { BARCODE_RSS_LTD, "1234567890123", 100, 30, 1, 74, "01001100111100101000100111010110101011001001010010101001010000011100011101" }, - /* 39*/ { BARCODE_RSS_LTD, "0000002013570", 100, 30, 1, 74, "01010101010100000010000001110100101101011001010111111110111111010101010101" }, - /* 40*/ { BARCODE_RSS_LTD, "0000002013571", 100, 30, 1, 74, "01010101010100000011000000110101011010100011010101010101000000100000011101" }, - /* 41*/ { BARCODE_RSS_LTD, "0000002013572", 100, 30, 1, 74, "01010101010100000011000000110101010010111001010101010101000000110000001101" }, - /* 42*/ { BARCODE_RSS_LTD, "0000000917879", 100, 30, 1, 74, "01010101010100000010000001110100110101010011010100110111011111010110011101" }, - /* 43*/ { BARCODE_RSS_LTD, "0000000000000", 100, 30, 1, 74, "01010101010100000010000001110101110101001001010101010101000000100000011101" }, - /* 44*/ { BARCODE_RSS_LTD, "0000000183063", 100, 30, 1, 74, "01010101010100000010000001110110101010010011010000001110000001010101010101" }, - /* 45*/ { BARCODE_RSS_LTD, "0000000183064", 100, 30, 1, 74, "01010101010100000010000001110010101010111001010101010101000111100000111101" }, - /* 46*/ { BARCODE_RSS_LTD, "0000000820063", 100, 30, 1, 74, "01010101010100000010000001110010101010011011010000011110001111010101010101" }, - /* 47*/ { BARCODE_RSS_LTD, "0000000820064", 100, 30, 1, 74, "01010101010100000010000001110110101101001001010101010101011111100011111101" }, - /* 48*/ { BARCODE_RSS_LTD, "0000001000775", 100, 30, 1, 74, "01010101010100000010000001110010110101011001010001111110111111010101010101" }, - /* 49*/ { BARCODE_RSS_LTD, "0000001000776", 100, 30, 1, 74, "01010101010100000010000001110101110101010001010101010101000001100000111101" }, - /* 50*/ { BARCODE_RSS_LTD, "0000001491020", 100, 30, 1, 74, "01010101010100000010000001110010101010110011010000011110000011010101010101" }, - /* 51*/ { BARCODE_RSS_LTD, "0000001491021", 100, 30, 1, 74, "01010101010100000010000001110101001010110011010101010101001111100001111101" }, - /* 52*/ { BARCODE_RSS_LTD, "0000001979844", 100, 30, 1, 74, "01010101010100000010000001110101010100011011010000111110011111010101010101" }, - /* 53*/ { BARCODE_RSS_LTD, "0000001979845", 100, 30, 1, 74, "01010101010100000010000001110101110100101001010101010101000000100000000101" }, - /* 54*/ { BARCODE_RSS_LTD, "0000001996938", 100, 30, 1, 74, "01010101010100000010000001110101101010001011010000000010000001010101010101" }, - /* 55*/ { BARCODE_RSS_LTD, "0000001996939", 100, 30, 1, 74, "01010101010100000010000001110110110101010001010101010101011111101111111101" }, - /* 56*/ { BARCODE_RSS_LTD, "0000012013571", 100, 30, 1, 74, "01010101010111000000100000010101010010100111010001110111100101001101101101" }, - /* 57*/ { BARCODE_RSS_LTD, "0368610347973", 100, 30, 1, 74, "01000000111000000101010101010010101011101001010101010101000000100000011101" }, - /* 58*/ { BARCODE_RSS_LTD, "0368612361544", 100, 30, 1, 74, "01010101010100011110000011110101001101010011010101010101000000100000011101" }, - /* 59*/ { BARCODE_RSS_LTD, "1651255074973", 100, 30, 1, 74, "01000001111000111101010101010101101001010011010101010101000000100000011101" }, - /* 60*/ { BARCODE_RSS_LTD, "1651257088544", 100, 30, 1, 74, "01010101010101111110001111110101101001101001010101010101000000100000011101" }, - /* 61*/ { BARCODE_RSS_LTD, "1999999999999", 100, 30, 1, 74, "01001111001101101011011111010101011010110001010100001011100011010111100101" }, - /* 62*/ { BARCODE_RSS_LTD_CC, "0000000000000", 100, 30, 6, 74, "01010101010100000110000011110100101011010011010101010101000000100000011101" }, - /* 63*/ { BARCODE_RSS_LTD_CC, "0000002013571", 100, 30, 6, 74, "01010101010100000111000001110101101010001011010101010101000000100000011101" }, - /* 64*/ { BARCODE_RSS_LTD_CC, "0987141101324", 100, 30, 6, 74, "01000001111000001101010101010110101010100011010101010101000000100000011101" }, - /* 65*/ { BARCODE_RSS_LTD_CC, "0987143114895", 100, 30, 6, 74, "01010101010100111110000111110101110101010001010101010101000000100000011101" }, - /* 66*/ { BARCODE_RSS_LTD_CC, "1971422931828", 100, 30, 6, 74, "01000011111001111101010101010100101010100111010101010101000000100000011101" }, - /* 67*/ { BARCODE_RSS_LTD_CC, "1971424945399", 100, 30, 6, 74, "01010101010100000010000000010110101010010011010101010101000000100000011101" }, - /* 68*/ { BARCODE_RSS_LTD_CC, "1999999999999", 100, 30, 6, 74, "01000010000001010101000001010110101101001001010100001011100011010111100101" }, - /* 69*/ { BARCODE_RSS_LTD, "1651257071912", 100, 30, 1, 74, "01000001111000111101010101010101110101001001010101010101011111101111111101" }, - /* 70*/ { BARCODE_RSS_LTD_CC, "0987144605916", 100, 30, 6, 74, "01010101010100111110000111110110101101001001010101010101001111100001111101" }, + /* 0*/ { BARCODE_DBAR_OMN, "1234567890123", 100, 30, 1, 96, "010111010010000001001110000000010100001011111010110100011001100101111111110001011011000111000101" }, + /* 1*/ { BARCODE_DBAR_OMN, "0000004537076", 100, 30, 1, 96, "010101001000000001000100000000010111111100101010111101111101010101111111110111010100100000000101" }, + /* 2*/ { BARCODE_DBAR_OMN, "0000004537077", 100, 30, 1, 96, "010101001000000001000111000000010111111101001010101010110000000101111100000111011111111011010101" }, + /* 3*/ { BARCODE_DBAR_OMN, "0000004537078", 100, 30, 1, 96, "010101001000000001000111000000010111111101001010101011010000000101111000000011011111111011010101" }, + /* 4*/ { BARCODE_DBAR_OMN, "0000000001596", 100, 30, 1, 96, "010101001000000001001111100000010111111100101010111101111101010101111100000111011111111011010101" }, + /* 5*/ { BARCODE_DBAR_OMN, "0000000001597", 100, 30, 1, 96, "010101001000000001011111000000010111111100101010101010110000000101111100000111011111110111010101" }, + /* 6*/ { BARCODE_DBAR_OMN, "0000000001598", 100, 30, 1, 96, "010101001000000001011111000000010111111100101010101011010000000101111000000011011111110111010101" }, + /* 7*/ { BARCODE_DBAR_OMN, "0000000000000", 100, 30, 1, 96, "010101001000000001000111111110010111111100101010101010110000000101111111110111011111111011010101" }, + /* 8*/ { BARCODE_DBAR_OMN, "0000000257117", 100, 30, 1, 96, "010101001000000001001111100000010111111100101010101010110000000101111110000011000111111011010101" }, + /* 9*/ { BARCODE_DBAR_OMN, "0000000536592", 100, 30, 1, 96, "010101001000000001000111000000010111111100101010101010110000000101100000000111011101100011110101" }, + /* 10*/ { BARCODE_DBAR_OMN, "0000001644132", 100, 30, 1, 96, "010101001000000001001111100000010111111100101010100100001111010101111100000111000001101111010101" }, + /* 11*/ { BARCODE_DBAR_OMN, "0000002421052", 100, 30, 1, 96, "010101001000000001011111000000010111111100101010101010110000000101111100000111011100010001101101" }, + /* 12*/ { BARCODE_DBAR_OMN, "0000003217955", 100, 30, 1, 96, "010101001000000001000111000000010111111100101010101010110000000101111111000001000000111001010101" }, + /* 13*/ { BARCODE_DBAR_OMN, "0000004792584", 100, 30, 1, 96, "010101001000000001000111110000010111111101001010111011111101010101111111110111010110101111111101" }, + /* 14*/ { BARCODE_DBAR_OMN, "0000006062184", 100, 30, 1, 96, "010101001000000001000111111110010111111101001010110111111101010101111111110111001010011011111101" }, + /* 15*/ { BARCODE_DBAR_OMN, "0000007734882", 100, 30, 1, 96, "010101001000000001000111111110010111111101001010110111000010010101111111000111001010001100111101" }, + /* 16*/ { BARCODE_DBAR_OMN, "0000008845782", 100, 30, 1, 96, "010101001000000001011111000000010111111101001010111101111101010101111111000001000010101000011101" }, + /* 17*/ { BARCODE_DBAR_OMN, "0000009329661", 100, 30, 1, 96, "010101001000000001001111111000010111111101010010111011111101010101111000000011010110101111111101" }, + /* 18*/ { BARCODE_DBAR_OMN, "0000009607386", 100, 30, 1, 96, "010101001000000001011111000000010111111101010010100111001011110101111111110111011100011011110101" }, + /* 19*/ { BARCODE_DBAR_OMN, "0000010718286", 100, 30, 1, 96, "010101001000000001000111110000010111111101010010100100001111010101111100000111000001101111010101" }, + /* 20*/ { BARCODE_DBAR_OMN, "0000011607006", 100, 30, 1, 96, "010101001000000001000111111110010111111101010010101101000100000101111000000011010011100001101101" }, + /* 21*/ { BARCODE_DBAR_OMN, "0004360130997", 100, 30, 1, 96, "010101001000000001000100000000010110010010011110101010110000000101111000000011011111111011010101" }, + /* 22*/ { BARCODE_DBAR_OMN, "0004360386504", 100, 30, 1, 96, "010101001000000001000111000000010110010010011110111011111101010101111111100011010110101111111101" }, + /* 23*/ { BARCODE_DBAR_OMN, "0009142746747", 100, 30, 1, 96, "010101000100000001000111111110010100111110001010101010110000000101111111000111011101100011110101" }, + /* 24*/ { BARCODE_DBAR_OMN, "0012319818547", 100, 30, 1, 96, "010101000100000001000100000000010110001100101000101010110000000101111111000111001100011110010101" }, + /* 25*/ { BARCODE_DBAR_OMN, "0013775011335", 100, 30, 1, 96, "010101000100000001000100000000010101001100000110101010110000000101111100000111011111010011100101" }, + /* 26*/ { BARCODE_DBAR_OMN, "0018894538190", 100, 30, 1, 96, "010101000010000001000100000000010110100100111100101010110000000101111111110001010001100011110101" }, + /* 27*/ { BARCODE_DBAR_OMN, "0021059247735", 100, 30, 1, 96, "010101000010000001000100000000010101000011001100101010110000000101111111100011010110111000001101" }, + /* 28*/ { BARCODE_DBAR_OMN, "0024094346235", 100, 30, 1, 96, "010101000001000001000100000000010111010000111010101010110000000101100000000111000110011001101101" }, + /* 29*/ { BARCODE_DBAR_OMN, "1995000595035", 100, 30, 1, 96, "010100011011000001001110000000010111010111010000101010110000000101111000000011000110011001101101" }, + /* 30*/ { BARCODE_DBAR_OMN, "9999999999999", 100, 30, 1, 96, "010010111011100001000111111110010111101101001110100011111101010101111111000001000111110101011101" }, + /* 31*/ { BARCODE_DBAR_OMN_CC, "0000000000000", 100, 30, 5, 100, "0000010010111011100001001110000000010111101101001110110001010111110101111111110001000111110101011101" }, + /* 32*/ { BARCODE_DBAR_OMN_CC, "0000729476171", 100, 30, 5, 100, "0000010010111011100001011100000000010111100110100010101010110000000101111111100011011111111011010101" }, + /* 33*/ { BARCODE_DBAR_OMN_CC, "0004359674363", 100, 30, 5, 100, "0000010010111011100001011100000000010101110010000100101010110000000101111000000011011101100011110101" }, + /* 34*/ { BARCODE_DBAR_OMN_CC, "0009142871421", 100, 30, 5, 100, "0000010010111101000011000111111110010100010111110010101010110000000101111111000111001100011110010101" }, + /* 35*/ { BARCODE_DBAR_OMN_CC, "0012319591881", 100, 30, 5, 100, "0000010010111101000011000100000000010101000111010000101010110000000101111111000111011100010001101101" }, + /* 36*/ { BARCODE_DBAR_OMN_CC, "6975446373038", 100, 30, 5, 100, "0000010111001110010111001111111000010101000111010000101010110000000101111100000111011111111011010101" }, + /* 37*/ { BARCODE_DBAR_OMN_CC, "9999999999999", 100, 30, 5, 100, "0000010110101111011111001111111000010110111100100010100110111001110101111111110001001100110001110101" }, + /* 38*/ { BARCODE_DBAR_LTD, "1234567890123", 100, 30, 1, 74, "01001100111100101000100111010110101011001001010010101001010000011100011101" }, + /* 39*/ { BARCODE_DBAR_LTD, "0000002013570", 100, 30, 1, 74, "01010101010100000010000001110100101101011001010111111110111111010101010101" }, + /* 40*/ { BARCODE_DBAR_LTD, "0000002013571", 100, 30, 1, 74, "01010101010100000011000000110101011010100011010101010101000000100000011101" }, + /* 41*/ { BARCODE_DBAR_LTD, "0000002013572", 100, 30, 1, 74, "01010101010100000011000000110101010010111001010101010101000000110000001101" }, + /* 42*/ { BARCODE_DBAR_LTD, "0000000917879", 100, 30, 1, 74, "01010101010100000010000001110100110101010011010100110111011111010110011101" }, + /* 43*/ { BARCODE_DBAR_LTD, "0000000000000", 100, 30, 1, 74, "01010101010100000010000001110101110101001001010101010101000000100000011101" }, + /* 44*/ { BARCODE_DBAR_LTD, "0000000183063", 100, 30, 1, 74, "01010101010100000010000001110110101010010011010000001110000001010101010101" }, + /* 45*/ { BARCODE_DBAR_LTD, "0000000183064", 100, 30, 1, 74, "01010101010100000010000001110010101010111001010101010101000111100000111101" }, + /* 46*/ { BARCODE_DBAR_LTD, "0000000820063", 100, 30, 1, 74, "01010101010100000010000001110010101010011011010000011110001111010101010101" }, + /* 47*/ { BARCODE_DBAR_LTD, "0000000820064", 100, 30, 1, 74, "01010101010100000010000001110110101101001001010101010101011111100011111101" }, + /* 48*/ { BARCODE_DBAR_LTD, "0000001000775", 100, 30, 1, 74, "01010101010100000010000001110010110101011001010001111110111111010101010101" }, + /* 49*/ { BARCODE_DBAR_LTD, "0000001000776", 100, 30, 1, 74, "01010101010100000010000001110101110101010001010101010101000001100000111101" }, + /* 50*/ { BARCODE_DBAR_LTD, "0000001491020", 100, 30, 1, 74, "01010101010100000010000001110010101010110011010000011110000011010101010101" }, + /* 51*/ { BARCODE_DBAR_LTD, "0000001491021", 100, 30, 1, 74, "01010101010100000010000001110101001010110011010101010101001111100001111101" }, + /* 52*/ { BARCODE_DBAR_LTD, "0000001979844", 100, 30, 1, 74, "01010101010100000010000001110101010100011011010000111110011111010101010101" }, + /* 53*/ { BARCODE_DBAR_LTD, "0000001979845", 100, 30, 1, 74, "01010101010100000010000001110101110100101001010101010101000000100000000101" }, + /* 54*/ { BARCODE_DBAR_LTD, "0000001996938", 100, 30, 1, 74, "01010101010100000010000001110101101010001011010000000010000001010101010101" }, + /* 55*/ { BARCODE_DBAR_LTD, "0000001996939", 100, 30, 1, 74, "01010101010100000010000001110110110101010001010101010101011111101111111101" }, + /* 56*/ { BARCODE_DBAR_LTD, "0000012013571", 100, 30, 1, 74, "01010101010111000000100000010101010010100111010001110111100101001101101101" }, + /* 57*/ { BARCODE_DBAR_LTD, "0368610347973", 100, 30, 1, 74, "01000000111000000101010101010010101011101001010101010101000000100000011101" }, + /* 58*/ { BARCODE_DBAR_LTD, "0368612361544", 100, 30, 1, 74, "01010101010100011110000011110101001101010011010101010101000000100000011101" }, + /* 59*/ { BARCODE_DBAR_LTD, "1651255074973", 100, 30, 1, 74, "01000001111000111101010101010101101001010011010101010101000000100000011101" }, + /* 60*/ { BARCODE_DBAR_LTD, "1651257088544", 100, 30, 1, 74, "01010101010101111110001111110101101001101001010101010101000000100000011101" }, + /* 61*/ { BARCODE_DBAR_LTD, "1999999999999", 100, 30, 1, 74, "01001111001101101011011111010101011010110001010100001011100011010111100101" }, + /* 62*/ { BARCODE_DBAR_LTD_CC, "0000000000000", 100, 30, 6, 74, "01010101010100000110000011110100101011010011010101010101000000100000011101" }, + /* 63*/ { BARCODE_DBAR_LTD_CC, "0000002013571", 100, 30, 6, 74, "01010101010100000111000001110101101010001011010101010101000000100000011101" }, + /* 64*/ { BARCODE_DBAR_LTD_CC, "0987141101324", 100, 30, 6, 74, "01000001111000001101010101010110101010100011010101010101000000100000011101" }, + /* 65*/ { BARCODE_DBAR_LTD_CC, "0987143114895", 100, 30, 6, 74, "01010101010100111110000111110101110101010001010101010101000000100000011101" }, + /* 66*/ { BARCODE_DBAR_LTD_CC, "1971422931828", 100, 30, 6, 74, "01000011111001111101010101010100101010100111010101010101000000100000011101" }, + /* 67*/ { BARCODE_DBAR_LTD_CC, "1971424945399", 100, 30, 6, 74, "01010101010100000010000000010110101010010011010101010101000000100000011101" }, + /* 68*/ { BARCODE_DBAR_LTD_CC, "1999999999999", 100, 30, 6, 74, "01000010000001010101000001010110101101001001010100001011100011010111100101" }, + /* 69*/ { BARCODE_DBAR_LTD, "1651257071912", 100, 30, 1, 74, "01000001111000111101010101010101110101001001010101010101011111101111111101" }, + /* 70*/ { BARCODE_DBAR_LTD_CC, "0987144605916", 100, 30, 6, 74, "01010101010100111110000111110110101101001001010101010101001111100001111101" }, }; int data_size = sizeof(data) / sizeof(struct item); @@ -138,7 +138,7 @@ static void test_binary_div_modulo_divisor(int index, int generate, int debug) { symbol->symbology = data[i].symbology; symbol->debug |= debug; - if (symbol->symbology == BARCODE_RSS14_CC || symbol->symbology == BARCODE_RSS_LTD_CC) { + if (symbol->symbology == BARCODE_DBAR_OMN_CC || symbol->symbology == BARCODE_DBAR_LTD_CC) { text = "[20]01"; strcpy(symbol->primary, data[i].data); } else { @@ -200,109 +200,109 @@ static void test_examples(int index, int generate, int debug) { }; // Verified manually against GS1 General Specifications 20.0 (GGS) and ISO/IEC 24724:2011, and verified via bwipp_dump.ps against BWIPP struct item data[] = { - /* 0*/ { BARCODE_RSS14, -1, "0950110153001", 1, 96, "GGS Figure 5.5.2.1.1-1. GS1 DataBar Omnidirectional", + /* 0*/ { BARCODE_DBAR_OMN, -1, "0950110153001", 1, 96, "GGS Figure 5.5.2.1.1-1. GS1 DataBar Omnidirectional", "010000010100000101000111110000010111101101011100100011011101000101100000000111001110110111001101" }, - /* 1*/ { BARCODE_RSS_EXP, -1, "[01]90614141000015[3202]000150", 1, 151, "GGS Figure 5.5.2.3.1-1. GS1 DataBar Expanded", + /* 1*/ { BARCODE_DBAR_EXP, -1, "[01]90614141000015[3202]000150", 1, 151, "GGS Figure 5.5.2.3.1-1. GS1 DataBar Expanded", "0101100011001100001011111111000010100100010000111101110011100010100010111100000011100111010111111011010100000100000110001111110000101000000100011010010" }, - /* 2*/ { BARCODE_RSS_EXPSTACK, -1, "[01]90614141000015[3202]000150", 5, 102, "GGS Figure 5.5.2.3.2-1. GS1 DataBar Expanded Stacked, same (tec-it separator differs)", + /* 2*/ { BARCODE_DBAR_EXPSTK, -1, "[01]90614141000015[3202]000150", 5, 102, "GGS Figure 5.5.2.3.2-1. GS1 DataBar Expanded Stacked, same (tec-it separator differs)", "010110001100110000101111111100001010010001000011110111001110001010001011110000001110011101011111101101" "000001110011001111010000000010100101101110111100001000110001110101110100001010100001100010100000010000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001011111011111001010000001010010111111011100100000000000000000000000000000000000000000000000000000" "001010100000100000110001111110000101000000100011010010000000000000000000000000000000000000000000000000" }, - /* 3*/ { BARCODE_RSS14, -1, "2001234567890", 1, 96, "24724:2011 Figure 1 — GS1 DataBar Omnidirectional", + /* 3*/ { BARCODE_DBAR_OMN, -1, "2001234567890", 1, 96, "24724:2011 Figure 1 — GS1 DataBar Omnidirectional", "010100011101000001001111111000010100110110111110110000010010100101100000000111000110110110001101" }, - /* 4*/ { BARCODE_RSS14, -1, "0441234567890", 1, 96, "24724:2011 Figure 2 — GS1 DataBar Omnidirectional", + /* 4*/ { BARCODE_DBAR_OMN, -1, "0441234567890", 1, 96, "24724:2011 Figure 2 — GS1 DataBar Omnidirectional", "010010001000010001000111000000010101000001100110101100100100000101111110000011000010100011100101" }, - /* 5*/ { BARCODE_RSS14, -1, "0001234567890", 1, 96, "24724:2011 Figure 4 — GS1 DataBar Truncated", + /* 5*/ { BARCODE_DBAR_OMN, -1, "0001234567890", 1, 96, "24724:2011 Figure 4 — GS1 DataBar Truncated", "010101001000000001001111111000010111001011011110111001010110000101111111000111001100111101110101" }, - /* 6*/ { BARCODE_RSS14STACK, -1, "0001234567890", 3, 50, "24724:2011 Figure 5 — GS1 DataBar Stacked NOTE: Figure 5 separator differs from GGS Figure 5.5.2.1.3-1. which has ends set", + /* 6*/ { BARCODE_DBAR_STK, -1, "0001234567890", 3, 50, "24724:2011 Figure 5 — GS1 DataBar Stacked NOTE: Figure 5 separator differs from GGS Figure 5.5.2.1.3-1. which has ends set", "01010100100000000100111111100001011100101101111010" "00001010101011111010000000111010100011010010000000" "10111001010110000101111111000111001100111101110101" }, - /* 7*/ { BARCODE_RSS14STACK_OMNI, -1, "0003456789012", 5, 50, "24724:2011 Figure 6 — GS1 DataBar Stacked Omnidirectional", + /* 7*/ { BARCODE_DBAR_OMNSTK, -1, "0003456789012", 5, 50, "24724:2011 Figure 6 — GS1 DataBar Stacked Omnidirectional", "01010100100000000100111110000001010011100110011010" "00001011011111111010000001010100101100011001100000" "00000101010101010101010101010101010101010101010000" "00001000100010111010010101010000111101001101110000" "10110111011101000101100000000111000010110010001101" }, - /* 8*/ { BARCODE_RSS_LTD, -1, "1501234567890", 1, 74, "24724:2011 Figure 7 — GS1 DataBar Limited", + /* 8*/ { BARCODE_DBAR_LTD, -1, "1501234567890", 1, 74, "24724:2011 Figure 7 — GS1 DataBar Limited", "01000110011000110110101001110100101011010011010010010110001101110011001101" }, - /* 9*/ { BARCODE_RSS_LTD, -1, "0031234567890", 1, 74, "24724:2011 Figure 8 — (a) GS1 DataBar Limited", + /* 9*/ { BARCODE_DBAR_LTD, -1, "0031234567890", 1, 74, "24724:2011 Figure 8 — (a) GS1 DataBar Limited", "01010100000100100010000101110010101101101001010110000010100100101100000101" }, - /* 10*/ { BARCODE_RSS_EXP, -1, "[01]98898765432106[3202]012345[15]991231", 1, 200, "24724:2011 Figure 10 — GS1 DataBar Expanded", + /* 10*/ { BARCODE_DBAR_EXP, -1, "[01]98898765432106[3202]012345[15]991231", 1, 200, "24724:2011 Figure 10 — GS1 DataBar Expanded", "01001000011000110110111111110000101110000110010100011010000001100010101111110000111010011100000010010100111110111001100011111100001011101100000100100100011110010110001011111111001110001101111010000101" }, - /* 11*/ { BARCODE_RSS_EXP, -1, "[01]90012345678908[3103]001750", 1, 151, "24724:2011 Figure 11 — GS1 DataBar Expanded", + /* 11*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3103]001750", 1, 151, "24724:2011 Figure 11 — GS1 DataBar Expanded", "0101110010000010011011111111000010111000010011000101011110111001100010111100000011100101110001110111011110101111000110001111110000101011000010011111010" }, - /* 12*/ { BARCODE_RSS_EXPSTACK, -1, "[01]98898765432106[3202]012345[15]991231", 5, 102, "24724:2011 Figure 12 — GS1 DataBar Expanded Stacked symbol", + /* 12*/ { BARCODE_DBAR_EXPSTK, -1, "[01]98898765432106[3202]012345[15]991231", 5, 102, "24724:2011 Figure 12 — GS1 DataBar Expanded Stacked symbol", "010010000110001101101111111100001011100001100101000110100000011000101011111100001110100111000000100101" "000001111001110010010000000010100100011110011010111001011111100111010100000010100001011000111111010000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000011101000010011100001000000001011100101100001110110110111110010001001010000001010011000100000110000" "101000010111101100011100111111110100011010011110001001001000001101110100001111110001100111011111001010" }, - /* 13*/ { BARCODE_RSS_EXPSTACK, -1, "[01]95012345678903[3103]000123", 5, 102, "24724:2011 Figure 13 — GS1 DataBar Expanded Stacked", + /* 13*/ { BARCODE_DBAR_EXPSTK, -1, "[01]95012345678903[3103]000123", 5, 102, "24724:2011 Figure 13 — GS1 DataBar Expanded Stacked", "010100010001111000101111111100001010111000001100010111000110001001101011110000001110010111000111011101" "000011101110000111010000000010100101000111110011101000111001110110010100001010100001101000111000100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000000001010000111001010000001010010111011011111100000000000000000000000000000000000000000000000000000" "001011110101111000110001111110000101000100100000011010000000000000000000000000000000000000000000000000" }, - /* 14*/ { BARCODE_RSS_LTD, -1, "0009876543210", 1, 74, "24724:2011 Figure F.2 — GS1 DataBar Limited", + /* 14*/ { BARCODE_DBAR_LTD, -1, "0009876543210", 1, 74, "24724:2011 Figure F.2 — GS1 DataBar Limited", "01010100100100110000110000010101101001011001010001000101000100000100100101" }, - /* 15*/ { BARCODE_RSS_EXP, -1, "[10]12A", 1, 102, "24724:2011 Figure F.3 — GS1 DataBar Expanded", + /* 15*/ { BARCODE_DBAR_EXP, -1, "[10]12A", 1, 102, "24724:2011 Figure F.3 — GS1 DataBar Expanded", "010100000110100000101111111100001010001000000010110101111100100111001011110000000010011101111111010101" }, - /* 16*/ { BARCODE_RSS14STACK, -1, "0000000000000", 3, 50, "#183 GS1 DataBar Stacked separator alternation; verified manually against tec-it.com", + /* 16*/ { BARCODE_DBAR_STK, -1, "0000000000000", 3, 50, "#183 GS1 DataBar Stacked separator alternation; verified manually against tec-it.com", "01010100100000000100011111111001011111110010101010" "00000101011111111010100000001010100000001101010000" "10101010110000000101111111110111011111111011010101" }, - /* 17*/ { BARCODE_RSS_EXP, -1, "[255]95011015340010123456789", 1, 232, "GGS 2.6.2.1 Example 1", + /* 17*/ { BARCODE_DBAR_EXP, -1, "[255]95011015340010123456789", 1, 232, "GGS 2.6.2.1 Example 1", "0100011000110001011011111111000010100000010101100001100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111011001000111100100101111111100111011111001100100110010011100010111100011110000001010" }, - /* 18*/ { BARCODE_RSS_EXP, -1, "[255]95011015340010123456789[3900]000", 1, 298, "GGS 2.6.2.1 Example 2", + /* 18*/ { BARCODE_DBAR_EXP, -1, "[255]95011015340010123456789[3900]000", 1, 298, "GGS 2.6.2.1 Example 2", "0101100011111010001011111111000010100001000001001101100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111011001000111100100101111111100111011111001100100110010011100010111100011000000001010111111011101000100001000110001101011111111100110011110010010001101" }, - /* 19*/ { BARCODE_RSS_EXP, -1, "[255]9501101534001[17]160531[3902]050", 1, 281, "GGS 2.6.2.1 Example 3", + /* 19*/ { BARCODE_DBAR_EXP, -1, "[255]9501101534001[17]160531[3902]050", 1, 281, "GGS 2.6.2.1 Example 3", "01011001000110011110111111110000101000000101011000011000011001110010101111100000011001000011101000010010000110111110100011111100001010010111111001110111000010010100001011111111001110000100001100110100010000001101001000110000000010111010011110011101110010110001100010111111111001101" }, - /* 20*/ { BARCODE_RSS_EXPSTACK, 3, "[255]9501101534001012345[8111]0500", 5, 151, "GGS 2.6.2.1 Example 4, same (tec-it separator differs)", + /* 20*/ { BARCODE_DBAR_EXPSTK, 3, "[255]9501101534001012345[8111]0500", 5, 151, "GGS 2.6.2.1 Example 4, same (tec-it separator differs)", "0101100111100011001011111111000010100000010101100001100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111010" "0000011000011100110100000000101001011111101010011110011110011000110101000001010100011011110001011110110111100100000101010000001010010110100000011000000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" "0000110111000011011010000000010000100000100111011001100001100100010010100101010100101110110001111001011101100011101110100000000010000000000000000000000" "1011001000111100100101111111100111011111011000100110011110011011101100011000000001010001001110000110100010011100010001011111111100110100000000000000000" }, - /* 21*/ { BARCODE_RSS_EXPSTACK, 3, "[255]9501101534001[3941]0035", 5, 151, "GGS 2.6.2.1 Example 5, same (tec-it separator differs)", + /* 21*/ { BARCODE_DBAR_EXPSTK, 3, "[255]9501101534001[3941]0035", 5, 151, "GGS 2.6.2.1 Example 5, same (tec-it separator differs)", "0100001101011000011011111111000010100000010101100001100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111010" "0000110010100111100100000000101001011111101010011110011110011000110101000001010100011011110001011110110111100100000101010000001010010110100000011000000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" "0000011011111011111010000000010000111100101011111001000100011100111010100001010100000000000000000000000000000000000000000000000000000000000000000000000" "1010100100000100000101111111100111000011010100000110111011100011000100011110000001010000000000000000000000000000000000000000000000000000000000000000000" }, - /* 22*/ { BARCODE_RSS14, -1, "0950110153000", 1, 96, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it", + /* 22*/ { BARCODE_DBAR_OMN, -1, "0950110153000", 1, 96, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it", "010000010100000101000111111110010111101101011100100011011011000101111110000011001110110111001101" }, - /* 23*/ { BARCODE_RSS14STACK, -1, "0950110153000", 3, 50, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it", + /* 23*/ { BARCODE_DBAR_STK, -1, "0950110153000", 3, 50, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it", "01000001010000010100011111111001011110110101110010" "00001100101101101010100001010100100001001010100000" "10100011011011000101111110000011001110110111001101" }, - /* 24*/ { BARCODE_RSS_EXPSTACK, -1, "[01]09501101530003[17]140704[10]AB-123", 9, 102, "https://www.gs1.org/standards/barcodes/databar, same (tec-it separator differs)", + /* 24*/ { BARCODE_DBAR_EXPSTK, -1, "[01]09501101530003[17]140704[10]AB-123", 9, 102, "https://www.gs1.org/standards/barcodes/databar, same (tec-it separator differs)", "010101111100001001101111111100001011100001110110010100000011011010001011111000000110011010000001001101" "000010000011110110010000000010100100011110001001101011111100100101110100000101010001100101111110110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -313,64 +313,64 @@ static void test_examples(int index, int generate, int debug) { "000010111101011110010100101010100100111100110010111001001100011111010100000000010000000000000000000000" "010001000010100001100011000000001011000011001101000110110011100000101011111111100110100000000000000000" }, - /* 25*/ { BARCODE_RSS_EXP, -1, "[01]09501101530003[17]140704[10]AB-123", 1, 281, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it", + /* 25*/ { BARCODE_DBAR_EXP, -1, "[01]09501101530003[17]140704[10]AB-123", 1, 281, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it", "01010111110000100110111111110000101110000111011001010000001101101000101111100000011001101000000100110001110100010001100011111100001010100000111100100100100111000001001011111111001110000011011001000100010000101000011000110000000010110000110011010001101100111000001010111111111001101" }, - /* 26*/ { BARCODE_RSS14STACK, -1, "07010001234567", 3, 50, "https://www.gs1.no/support/standardbibliotek/datafangst/gs1-databar, same, verified manually against tec-it", + /* 26*/ { BARCODE_DBAR_STK, -1, "07010001234567", 3, 50, "https://www.gs1.no/support/standardbibliotek/datafangst/gs1-databar, same, verified manually against tec-it", "01000100001010000100011100000001011000100110001010" "00000011010101011010101011111010100111010101010000" "10111100101110100101100000000111011000001000110101" }, - /* 27*/ { BARCODE_RSS14STACK_OMNI, -1, "12380000000008", 5, 50, "Example with finder values 3 & 3; for bottom row see 5.3.2.2, same as BWIPP (tec-it and IDAutomation differ (ie no shift))", + /* 27*/ { BARCODE_DBAR_OMNSTK, -1, "12380000000008", 5, 50, "Example with finder values 3 & 3; for bottom row see 5.3.2.2, same as BWIPP (tec-it and IDAutomation differ (ie no shift))", "01011101001000000100010000000001010000001101011010" "00000010110111111010101010101010101111110010100000" "00000101010101010101010101010101010101010101010000" "00001101100011001010000000000100101100111011110000" "10100010011100110101111111110111010011000100001101" }, - /* 28*/ { BARCODE_RSS14STACK_OMNI, -1, "99991234912372", 5, 50, "Example with finder values 8 & 6, same as BWIPP, verified manually against tec-it and IDAutomation", + /* 28*/ { BARCODE_DBAR_OMNSTK, -1, "99991234912372", 5, 50, "Example with finder values 8 & 6, same as BWIPP, verified manually against tec-it and IDAutomation", "01001011101110000101110000000001011111011100101010" "00000100010001111010001010101010100000100011010000" "00000101010101010101010101010101010101010101010000" "00001000100011001010000000010100100001000100100000" "10100111011100110101111111100011011110111011011101" }, - /* 29*/ { BARCODE_RSS14STACK_OMNI, -1, "32219876543217", 5, 50, "Example with finder values 6 & 1, same as BWIPP, verified manually against tec-it and IDAutomation", + /* 29*/ { BARCODE_DBAR_OMNSTK, -1, "32219876543217", 5, 50, "Example with finder values 6 & 1, same as BWIPP, verified manually against tec-it and IDAutomation", "01001011000010001100111000000001011100010101000010" "00000100111101110010000101010100100011101010110000" "00000101010101010101010101010101010101010101010000" "00001110011100101010000010101000110100001000010000" "10110001100011010101111100000111001011110111100101" }, - /* 30*/ { BARCODE_RSS14STACK_OMNI, -1, "32219876543255", 5, 50, "Example with finder values 7 & 7, same as BWIPP, verified manually against tec-it and IDAutomation", + /* 30*/ { BARCODE_DBAR_OMNSTK, -1, "32219876543255", 5, 50, "Example with finder values 7 & 7, same as BWIPP, verified manually against tec-it and IDAutomation", "01001011000010001101111100000001011100010101000010" "00000100111101110010000010101010100011101010110000" "00000101010101010101010101010101010101010101010000" "00000111001110101010000000101010110100001000010000" "10111000110001010101111111000001001011110111100101" }, - /* 31*/ { BARCODE_RSS14STACK_OMNI, -1, "04072912296211", 5, 50, "Example with finder values 7 & 8, same as BWIPP, verified manually against tec-it and IDAutomation", + /* 31*/ { BARCODE_DBAR_OMNSTK, -1, "04072912296211", 5, 50, "Example with finder values 7 & 8, same as BWIPP, verified manually against tec-it and IDAutomation", "01001001000000010101111100000001011111000100101010" "00000110111111101010000010101010100000111011010000" "00000101010101010101010101010101010101010101010000" "00001110100010111010000000001010111010000111010000" "10110001011101000101111111110001000101111000101101" }, - /* 32*/ { BARCODE_RSS14STACK_OMNI, -1, "06666666666666", 5, 50, "Example with finder values 6 & 4, same as BWIPP, verified manually against tec-it and IDAutomation", + /* 32*/ { BARCODE_DBAR_OMNSTK, -1, "06666666666666", 5, 50, "Example with finder values 6 & 4, same as BWIPP, verified manually against tec-it and IDAutomation", "01000100010010000100111000000001011110111100101010" "00001011101101111010000101010100100001000011010000" "00000101010101010101010101010101010101010101010000" "00000100011111001010000101010100101001100001110000" "10101011100000110101111000000011010110011110000101" }, - /* 33*/ { BARCODE_RSS_EXPSTACK, -1, "[90]12345678901234567", 5, 102, "Example with 7 chars, 1 full row, bottom 3 chars", + /* 33*/ { BARCODE_DBAR_EXPSTK, -1, "[90]12345678901234567", 5, 102, "Example with 7 chars, 1 full row, bottom 3 chars", "010010100001111000101111111100001010000010001110110100111110001011101011111100001110001111010011000101" "000001011110000111010000000010100101111101110001001011000001110100010100000010100001110000101100110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000000100000000101111110110001101011110001110011010100101000000101000010010111000000000000000000000000" "101110011111111010000001001110010100001110001100101010000111111000111101101000111101000000000000000000" }, - /* 34*/ { BARCODE_RSS_EXPSTACK, -1, "[90]123456789012345678901234567", 9, 102, "Example with 10 chars, 2 full rows, bottom 2 chars", + /* 34*/ { BARCODE_DBAR_EXPSTK, -1, "[90]123456789012345678901234567", 9, 102, "Example with 10 chars, 2 full rows, bottom 2 chars", "010000111100100010101111111100001010001000100000110100111110001011101011111000000110001111010011000101" "000011000011011101010000000010100101110111011111001011000001110100010100000101010001110000101100110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -381,7 +381,7 @@ static void test_examples(int index, int generate, int debug) { "000010000110110001010100001010100100000111010011000000000000000000000000000000000000000000000000000000" "010001111001001110100011110000001011111000101100100100000000000000000000000000000000000000000000000000" }, - /* 35*/ { BARCODE_RSS_EXPSTACK, -1, "[90]123456789012345678901234567890", 9, 102, "Example with 11 chars, 2 full rows, bottom 3 chars", + /* 35*/ { BARCODE_DBAR_EXPSTK, -1, "[90]123456789012345678901234567890", 9, 102, "Example with 11 chars, 2 full rows, bottom 3 chars", "010111011100010001101111111100001010000010001110110100111110001011101011111000000110001111010011000101" "000000100011101110010000000010100101111101110001001011000001110100010100000101010001110000101100110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -392,7 +392,7 @@ static void test_examples(int index, int generate, int debug) { "000010000110110001010100101010100100111000100011011011000110001101110100000000010000000000000000000000" "010001111001001110100011000000001011000111011100100100111001110010001011111111100110100000000000000000" }, - /* 36*/ { BARCODE_RSS_EXPSTACK, -1, "[91]1234567890123456789012345678901234", 9, 102, "Example with 12 chars, 3 full rows", + /* 36*/ { BARCODE_DBAR_EXPSTK, -1, "[91]1234567890123456789012345678901234", 9, 102, "Example with 12 chars, 3 full rows", "010100010011111001101111111100001011001000010000010100111110001011101011111000000110001111010011000101" "000011101100000110010000000010100100110111101111101011000001110100010100000101010001110000101100110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -403,7 +403,7 @@ static void test_examples(int index, int generate, int debug) { "000010000110110001010100101010100100111000100011011011000110001110110100000000010001101110100001000000" "010001111001001110100011000000001011000111011100100100111001110001001011111111100110010001011110111101" }, - /* 37*/ { BARCODE_RSS_EXPSTACK, -1, "[91]123456789012345678901234567890123456789012", 13, 102, "Example with 15 chars, 3 full rows, bottom 7 chars", + /* 37*/ { BARCODE_DBAR_EXPSTK, -1, "[91]123456789012345678901234567890123456789012", 13, 102, "Example with 15 chars, 3 full rows, bottom 7 chars", "010010000111101011101111111100001011100000101100010100111110001011101011110000000010001111010011000101" "000001111000010100010000000010100100011111010011101011000001110100010100001010101001110000101100110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -418,7 +418,7 @@ static void test_examples(int index, int generate, int debug) { "000000100000000101001001111101100011000010000110010100101010100101011111011100100000000000000000000000" "101110011111111010110110000010011100111101111001101010000000011000100000100011011101000000000000000000" }, - /* 38*/ { BARCODE_RSS_EXPSTACK, 3, "[91]123456789012345678901234567890123456789012", 9, 151, "Example with 15 chars, 2 full rows, bottom 3 chars", + /* 38*/ { BARCODE_DBAR_EXPSTK, 3, "[91]123456789012345678901234567890123456789012", 9, 151, "Example with 15 chars, 2 full rows, bottom 3 chars", "0100100001111010111011111111000010111000001011000101001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010" "0000011110000101000100000000101001000111110100111010110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000110000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" @@ -429,7 +429,7 @@ static void test_examples(int index, int generate, int debug) { "0000001001110111110101001010101001010011000010000110001101111100100101000000001000000000000000000000000000000000000000000000000000000000000000000000000" "0101110110001000001000110000000010101100111101111001110010000011011010111111110011101000000000000000000000000000000000000000000000000000000000000000000" }, - /* 39*/ { BARCODE_RSS_EXPSTACK, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", 17, 102, "Example with 19 chars, 4 full rows, bottom 3 chars", + /* 39*/ { BARCODE_DBAR_EXPSTK, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", 17, 102, "Example with 19 chars, 4 full rows, bottom 3 chars", "010101111100011101101111111100001011100000101100010101111110011110101011110000000010111000111110010101" "000010000011100010010000000010100100011111010011101010000001100001010100001010101001000111000001100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -448,7 +448,7 @@ static void test_examples(int index, int generate, int debug) { "000010011111000111010001010101010101000111001111011011110100110000110100000000010000000000000000000000" "010101100000111000100110000000001010111000110000100100001011001111001011111111100110100000000000000000" }, - /* 40*/ { BARCODE_RSS_EXPSTACK, -1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 21, 102, "Example with 22 chars, 5 full rows, bottom 2 chars", + /* 40*/ { BARCODE_DBAR_EXPSTK, -1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 21, 102, "Example with 22 chars, 5 full rows, bottom 2 chars", "010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101" "000010100001000000010000000010100100110111111010111011000001110100010100001010101001110000101100110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -471,7 +471,7 @@ static void test_examples(int index, int generate, int debug) { "000001000111010000101000101010101010100001011000110000000000000000000000000000000000000000000000000000" "001000111000101111010011000000000101011110100111000010000000000000000000000000000000000000000000000000" }, - /* 41*/ { BARCODE_RSS_EXPSTACK, 3, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 13, 151, "Example with 22 chars, 3 full rows, bottom 4 chars", + /* 41*/ { BARCODE_DBAR_EXPSTK, 3, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 13, 151, "Example with 22 chars, 3 full rows, bottom 4 chars", "0101010111101111111011111111000010110010000001010001001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010" "0000101000010000000100000000101001001101111110101110110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000110000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" @@ -486,7 +486,7 @@ static void test_examples(int index, int generate, int debug) { "0000101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000" "1010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000" }, - /* 42*/ { BARCODE_RSS_EXPSTACK, 4, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 9, 200, "Example with 22 chars, 2 full rows, bottom 6 chars", + /* 42*/ { BARCODE_DBAR_EXPSTK, 4, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 9, 200, "Example with 22 chars, 2 full rows, bottom 6 chars", "01010101111011111110111111110000101100100000010100010011111000101110101111000000001000111101001100010111100010110111100011111100001010100110001110000101001110000010001011110000001110001110001000100101" "00001010000100000001000000001010010011011111101011101100000111010001010000101010100111000010110011101000011101001000010100000010100101011001110001111010110001111101110100001010100001110001110111010000" "00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -497,7 +497,7 @@ static void test_examples(int index, int generate, int debug) { "00000011000110001001000000010101010000011110011010101101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000" "01011100111001110110011111100000101111100001100101010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000" }, - /* 43*/ { BARCODE_RSS_EXPSTACK, 5, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 9, 249, "Example with 22 chars, 2 full rows, bottom 2 chars", + /* 43*/ { BARCODE_DBAR_EXPSTK, 5, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 9, 249, "Example with 22 chars, 2 full rows, bottom 2 chars", "010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101111000101101111000111111000010101001100011100001010011100000100010111100000011100011100010001001000111100100111010001111000000101100011101110010010" "000010100001000000010000000010100100110111111010111011000001110100010100001010101001110000101100111010000111010010000101000000101001010110011100011110101100011111011101000010101000011100011101110110111000011011000101010000101010010011100010001100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" @@ -508,45 +508,45 @@ static void test_examples(int index, int generate, int debug) { "000010001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "010001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 44*/ { BARCODE_RSS_EXPSTACK, 6, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 298, "Example with 22 chars, 1 full row, bottom 10 chars", + /* 44*/ { BARCODE_DBAR_EXPSTK, 6, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 298, "Example with 22 chars, 1 full row, bottom 10 chars", "0101010111101111111011111111000010110010000001010001001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010100111000001000101111000000111000111000100010010001111001001110100011110000001011000111011100100100111001110001001011111111001110100001011110111101" "0000101000010000000100000000101001001101111110101110110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000111101011000111110111010000101010000111000111011101101110000110110001010100001010100100111000100011011011000110001110110100000000100001011110100001000000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "0000000100111011111010100101010100101001100001000011000100010111101110100000101010001100000110011010010001100011000100100000001010101000001111001101010110111000100011101000000000100010111110100011000111000111010000101000101010101010100001011000110000000000000000000000000000000000000000000000000000" "0010111011000100000100011000000001010110011110111100111011101000010001011111000000110011111001100101101110011100111011001111110000010111110000110010101001000111011100010111111111001101000001011100111000111000101111010011000000000101011110100111000010000000000000000000000000000000000000000000000000" }, - /* 45*/ { BARCODE_RSS_EXPSTACK, 7, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 347, "Example with 22 chars, 1 full row, bottom 8 chars", + /* 45*/ { BARCODE_DBAR_EXPSTK, 7, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 347, "Example with 22 chars, 1 full row, bottom 8 chars", "01010101111011111110111111110000101100100000010100010011111000101110101111000000001000111101001100010111100010110111100011111100001010100110001110000101001110000010001011110000001110001110001000100100011110010011101000111100000010110001110111001001001110011100010010111111110011101000010111101111011101100010000010001100000000101011001111011110010" "00001010000100000001000000001010010011011111101011101100000111010001010000101010100111000010110011101000011101001000010100000010100101011001110001111010110001111101110100001010100001110001110111011011100001101100010101000010101001001110001000110110110001100011101101000000001000010111101000010000100010011101111101010010101010010100110000100000000" "00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" "00000100010111101110100000101010001100000110011010010001100011000100100000001010101000001111001101010110111000100011101000000000100010111110100011000111000111010000101000101010101010100001011000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "10111011101000010001011111000000110011111001100101101110011100111011001111110000010111110000110010101001000111011100010111111111001101000001011100111000111000101111010011000000000101011110100111000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 46*/ { BARCODE_RSS_EXPSTACK, 8, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 396, "Example with 22 chars, 1 full row, bottom 6 chars", + /* 46*/ { BARCODE_DBAR_EXPSTK, 8, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 396, "Example with 22 chars, 1 full row, bottom 6 chars", "010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101111000101101111000111111000010101001100011100001010011100000100010111100000011100011100010001001000111100100111010001111000000101100011101110010010011100111000100101111111100111010000101111011110111011000100000100011000000001010110011110111100111011101000010001011111000000110011111001100101101" "000010100001000000010000000010100100110111111010111011000001110100010100001010101001110000101100111010000111010010000101000000101001010110011100011110101100011111011101000010101000011100011101110110111000011011000101010000101010010011100010001101101100011000111011010000000010000101111010000100001000100111011111010100101010100101001100001000011000100010111101110100000101010001100000110011010000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000000011000110001001000000010101010000011110011010101101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "001011100111001110110011111100000101111100001100101010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 47*/ { BARCODE_RSS_EXPSTACK, 9, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 445, "Example with 22 chars, 1 full row, bottom 4 chars", + /* 47*/ { BARCODE_DBAR_EXPSTK, 9, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 445, "Example with 22 chars, 1 full row, bottom 4 chars", "0101010111101111111011111111000010110010000001010001001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010100111000001000101111000000111000111000100010010001111001001110100011110000001011000111011100100100111001110001001011111111001110100001011110111101110110001000001000110000000010101100111101111001110111010000100010111110000001100111110011001011011100111001110110011111100000101111100001100101010" "0000101000010000000100000000101001001101111110101110110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000111101011000111110111010000101010000111000111011101101110000110110001010100001010100100111000100011011011000110001110110100000000100001011110100001000010001001110111110101001010101001010011000010000110001000101111011101000001010100011000001100110100100011000110001001000000010101010000011110011010000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" "0000101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "1010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 48*/ { BARCODE_RSS_EXPSTACK, 10, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 494, "Example with 22 chars, 1 full row, bottom 2 chars", + /* 48*/ { BARCODE_DBAR_EXPSTK, 10, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 5, 494, "Example with 22 chars, 1 full row, bottom 2 chars", "01010101111011111110111111110000101100100000010100010011111000101110101111000000001000111101001100010111100010110111100011111100001010100110001110000101001110000010001011110000001110001110001000100100011110010011101000111100000010110001110111001001001110011100010010111111110011101000010111101111011101100010000010001100000000101011001111011110011101110100001000101111100000011001111100110010110111001110011101100111111000001011111000011001010100100011101110001011111111100110100000101110011101" "00001010000100000001000000001010010011011111101011101100000111010001010000101010100111000010110011101000011101001000010100000010100101011001110001111010110001111101110100001010100001110001110111011011100001101100010101000010101001001110001000110110110001100011101101000000001000010111101000010000100010011101111101010010101010010100110000100001100010001011110111010000010101000110000011001101001000110001100010010000000101010100000111100110101011011100010001110100000000010001011111010001100000" "00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "00000100011101000010100010101010101010000101100011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "00100011100010111101001100000000010101111010011100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 49*/ { BARCODE_RSS_EXPSTACK, 11, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 1, 543, "Example with 22 chars, 1 row", + /* 49*/ { BARCODE_DBAR_EXPSTK, 11, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 1, 543, "Example with 22 chars, 1 row", "010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101111000101101111000111111000010101001100011100001010011100000100010111100000011100011100010001001000111100100111010001111000000101100011101110010010011100111000100101111111100111010000101111011110111011000100000100011000000001010110011110111100111011101000010001011111000000110011111001100101101110011100111011001111110000010111110000110010101001000111011100010111111111001101000001011100111000111000101111010011000000000101011110100111000010" }, - /* 50*/ { BARCODE_RSS_EXPSTACK, 1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 41, 53, "Example with 22 chars, 11 rows", + /* 50*/ { BARCODE_DBAR_EXPSTK, 1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 41, 53, "Example with 22 chars, 11 rows", "01010101111011111110111111110000101100100000010100010" "00001010000100000001000000001010010011011111101010000" "00000101010101010101010101010101010101010101010100000" @@ -589,14 +589,14 @@ static void test_examples(int index, int generate, int debug) { "00001000111010000101000101010101010100001011000110000" "01000111000101111010011000000000101011110100111000010" }, - /* 51*/ { BARCODE_RSS_EXPSTACK, 6, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 298, "#200 Daniel Gredler mostly empty last row, 16 chars, 2 rows, bottom row 4 chars", + /* 51*/ { BARCODE_DBAR_EXPSTK, 6, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 298, "#200 Daniel Gredler mostly empty last row, 16 chars, 2 rows, bottom row 4 chars", "0100011101110001011011111111000010110000100101111101101000000110001010111100000000101001110000001001010011111011100110001111110000101110101000011000011010011100011000101111000000111001111000111101010111110010110000100011110000001010110010000010000111011111000100101011111100001110011110011000100101" "0000100010001110100100000000101001001111011010000010010111111001110101000010101010010110001111110110101100000100011001010000001010010001010111100111100101100011100111010000101010000110000111000010101000001101001111010100001010100101001101111101111000100000111011010100000010100001100001100111010000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "0000110000010010011000010000000010111110011010001001111010011011100010010101010010101110100011111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "1010001111101101100111001111111101000001100101110110000101100100011101000000001100010001011100000110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 52*/ { BARCODE_RSS_EXPSTACK, 3, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 9, 151, "#200 16 chars, 3 rows, bottom row 4 chars", + /* 52*/ { BARCODE_DBAR_EXPSTK, 3, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 9, 151, "#200 16 chars, 3 rows, bottom row 4 chars", "0100011101110001011011111111000010110000100101111101101000000110001010111100000000101001110000001001010011111011100110001111110000101110101000011000010" "0000100010001110100100000000101001001111011010000010010111111001110101000010101010010110001111110110101100000100011001010000001010010001010111100110000" "0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" @@ -607,28 +607,28 @@ static void test_examples(int index, int generate, int debug) { "0000011111000101110101001010101001000111011001011110010001011001111101000000001000011001001000001100000000000000000000000000000000000000000000000000000" "0101100000111010001000110000000010111000100110100001101110100110000010111111110011100110110111110001010000000000000000000000000000000000000000000000000" }, - /* 53*/ { BARCODE_RSS_EXPSTACK, 4, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 200, "#200 16 chars, 2 full rows", + /* 53*/ { BARCODE_DBAR_EXPSTK, 4, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 200, "#200 16 chars, 2 full rows", "01000111011100010110111111110000101100001001011111011010000001100010101111000000001010011100000010010100111110111001100011111100001011101010000110000110100111000110001011110000001110011110001111010101" "00001000100011101001000000001010010011110110100000100101111110011101010000101010100101100011111101101011000001000110010100000010100100010101111001111001011000111001110100001010100001100001110000100000" "00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "00001100000100100110000100000000101111100110100010011110100110111000100101010100101011101000111110010110111001100001100001010000001010110111000001000111101111101100101001010100001010111100101100000000" "10100011111011011001110011111111010000011001011101100001011001000111010000000011000100010111000001101001000110011110011100001111110101001000111110111000010000010011010100000011110001000011010011111010" }, - /* 54*/ { BARCODE_RSS_EXPSTACK, 5, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 249, "#200 16 chars, 2 rows, bottom row 6 chars", + /* 54*/ { BARCODE_DBAR_EXPSTK, 5, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 249, "#200 16 chars, 2 rows, bottom row 6 chars", "010001110111000101101111111100001011000010010111110110100000011000101011110000000010100111000000100101001111101110011000111111000010111010100001100001101001110001100010111100000011100111100011110101011111001011000010001111000000101011001000001000010" "000010001000111010010000000010100100111101101000001001011111100111010100001010101001011000111111011010110000010001100101000000101001000101011110011110010110001110011101000010101000011000011100001010100000110100111101010000101010010100110111110110000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" "000001000001110110101000000101000011000011001110110100111110001011101010010101010010001110110010111100100010110011111010000000010000110010010000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "101110111110001001010111111000011100111100110001001011000001110100010001100000000101110001001101000011011101001100000101111111100111001101101111100010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 55*/ { BARCODE_RSS_EXPSTACK, 7, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 347, "#200 16 chars, 2 rows, bottom row 2 chars", + /* 55*/ { BARCODE_DBAR_EXPSTK, 7, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 5, 347, "#200 16 chars, 2 rows, bottom row 2 chars", "01000111011100010110111111110000101100001001011111011010000001100010101111000000001010011100000010010100111110111001100011111100001011101010000110000110100111000110001011110000001110011110001111010101111100101100001000111100000010101100100000100001110111110001001010111111000011100111100110001001011000001110100010001100000000101110001001101000010" "00001000100011101001000000001010010011110110100000100101111110011101010000101010100101100011111101101011000001000110010100000010100100010101111001111001011000111001110100001010100001100001110000101010000011010011110101000010101001010011011111011110001000001110110101000000101000011000011001110110100111110001011101010010101010010001110110010110000" "00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000" "00001000101100111110100000000100001100100100000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "10110111010011000001011111111001110011011011111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, - /* 56*/ { BARCODE_RSS_EXPSTACK, 8, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 1, 396, "#200 16 chars, 1 row", + /* 56*/ { BARCODE_DBAR_EXPSTK, 8, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 1, 396, "#200 16 chars, 1 row", "010001110111000101101111111100001011000010010111110110100000011000101011110000000010100111000000100101001111101110011000111111000010111010100001100001101001110001100010111100000011100111100011110101011111001011000010001111000000101011001000001000011101111100010010101111110000111001111001100010010110000011101000100011000000001011100010011010000110111010011000001011111111001110011011011111000101" }, }; @@ -696,144 +696,144 @@ static void test_general_field(int index, int generate, int debug) { }; // Verified via bwipp_dump.ps against BWIPP and manually against tec-it.com (some separators differ from tec-it.com where noted) struct item data[] = { - /* 0*/ { BARCODE_RSS_EXP, "[91]1", 1, 102, "Single numeric", + /* 0*/ { BARCODE_DBAR_EXP, "[91]1", 1, 102, "Single numeric", "010100000001000101101111111100001011001000010000010110111110101100001011110000000010101111100001011101" }, - /* 1*/ { BARCODE_RSS_EXP, "[91]12", 1, 102, "2 numerics", + /* 1*/ { BARCODE_DBAR_EXP, "[91]12", 1, 102, "2 numerics", "010010000010000101101111111100001011001000010000010101111100101110001011110000000010101111100001011101" }, - /* 2*/ { BARCODE_RSS_EXP, "[91]123", 1, 102, "Odd-numbered numeric", + /* 2*/ { BARCODE_DBAR_EXP, "[91]123", 1, 102, "Odd-numbered numeric", "010100000110000100101111111100001011001000010000010100011111010111001011110000000010000011000110100101" }, - /* 3*/ { BARCODE_RSS_EXP, "[91]1234", 1, 102, "Even-numbered numeric", + /* 3*/ { BARCODE_DBAR_EXP, "[91]1234", 1, 102, "Even-numbered numeric", "010110010000001000101111111100001011001000010000010100111110001011101011110000000010001101111001011101" }, - /* 4*/ { BARCODE_RSS_EXP, "[91]A1234567C", 1, 183, "Alphanumeric followed by 7 digits and alphanumeric", + /* 4*/ { BARCODE_DBAR_EXP, "[91]A1234567C", 1, 183, "Alphanumeric followed by 7 digits and alphanumeric", "010100000111001001101111111100001011000001000101110101111110111101001011111100001110100110111110111100001111010110011000111111000010110001000001101101110111101111010010111111110011101" }, - /* 5*/ { BARCODE_RSS_EXP, "[91]A123456C", 1, 151, "Alphanumeric followed by 6 digits and alphanumeric", + /* 5*/ { BARCODE_DBAR_EXP, "[91]A123456C", 1, 151, "Alphanumeric followed by 6 digits and alphanumeric", "0101100111001000001011111111000010110010000100000101011111101111010010111100000011101001101111101111000011110101100110001111110000101000100011000111010" }, - /* 6*/ { BARCODE_RSS_EXP, "[91]A12345B", 1, 151, "Alphanumeric followed by 5 digits and alphanumeric", + /* 6*/ { BARCODE_DBAR_EXP, "[91]A12345B", 1, 151, "Alphanumeric followed by 5 digits and alphanumeric", "0101111001000001001011111111000010110010000100000101011111101111010010111100000011100000010111001001010000111101000010001111110000101100000001001010010" }, - /* 7*/ { BARCODE_RSS_EXP, "[91]A1234567", 1, 151, "Alphanumeric followed by 7 digits, terminating", + /* 7*/ { BARCODE_DBAR_EXP, "[91]A1234567", 1, 151, "Alphanumeric followed by 7 digits, terminating", "0101100100011100001011111111000010110010000100000101011111101111010010111100000011101001101111101111000011110110100110001111110000101101011110111100010" }, - /* 8*/ { BARCODE_RSS_EXP, "[91]A123456", 1, 134, "Alphanumeric followed by 6 digits, terminating", + /* 8*/ { BARCODE_DBAR_EXP, "[91]A123456", 1, 134, "Alphanumeric followed by 6 digits, terminating", "01000101001100000010111111110000101100000100010111010111111011110100101111000000111010011011111011110000111101011001100011111100001010" }, - /* 9*/ { BARCODE_RSS_EXP, "[91]A12345", 1, 134, "Alphanumeric followed by 5 digits, terminating", + /* 9*/ { BARCODE_DBAR_EXP, "[91]A12345", 1, 134, "Alphanumeric followed by 5 digits, terminating", "01000110010100000010111111110000101100000100010111010111111011110100101111000000111010011011111011110000101100111110100011111100001010" }, - /*10*/ { BARCODE_RSS_EXP, "[91]A1234", 1, 134, "Alphanumeric followed by 4 digits, terminating", + /*10*/ { BARCODE_DBAR_EXP, "[91]A1234", 1, 134, "Alphanumeric followed by 4 digits, terminating", "01011101000010000110111111110000101100000100010111010111111011110100101111000000111010011011111011110001101111100100100011111100001010" }, - /*11*/ { BARCODE_RSS_EXP, "[91]A123", 1, 134, "Alphanumeric followed by 3 digits, terminating", + /*11*/ { BARCODE_DBAR_EXP, "[91]A123", 1, 134, "Alphanumeric followed by 3 digits, terminating", "01000010110010000010111111110000101100000100010111010111111011110100101111000000111000000101110010010001000010000101100011111100001010" }, - /*12*/ { BARCODE_RSS_EXP, "[91]a1234ABCDEFGb", 1, 249, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 4 digits", + /*12*/ { BARCODE_DBAR_EXP, "[91]a1234ABCDEFGb", 1, 249, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 4 digits", "010000100011100110101111111100001011001000010000010101101111110011101011111000000110000110110100011100001110000101011000111111000010100111000010110001000000100110110010111111110011101000001110010001010011011111100110001111000000101110111010011000010" }, - /*13*/ { BARCODE_RSS_EXP, "[91]a1234ABCDEFb", 1, 249, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 4 digits", + /*13*/ { BARCODE_DBAR_EXP, "[91]a1234ABCDEFb", 1, 249, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 4 digits", "010111010001110001101111111100001011001000010000010101101111110011101011111000000110000110110100011100001110000101011000111111000010100111000010110001000000100110110010111111110011101000001110010001001100011011100110001111000000101101000111001110010" }, - /*14*/ { BARCODE_RSS_EXP, "[91]a1234ABCDEF", 1, 232, "ISO-646 followed by 10 non-ISO-646 terminating, starting 4 digits", + /*14*/ { BARCODE_DBAR_EXP, "[91]a1234ABCDEF", 1, 232, "ISO-646 followed by 10 non-ISO-646 terminating, starting 4 digits", "0100001011010000111011111111000010110000010001011101011011111100111010111110000001100001101101000111000011100001010110001111110000101001110000101100010000001001101100101111111100111010000011100100010011100111000101100011110000001010" }, - /*15*/ { BARCODE_RSS_EXP, "[91]a1234ABCDEb", 1, 232, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 4 digits", + /*15*/ { BARCODE_DBAR_EXP, "[91]a1234ABCDEb", 1, 232, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 4 digits", "0100001011011000011011111111000010110000010001011101011011111100111010111110000001100100011100100111011110010111110010001111110000101111100011001010010110001000011110101111111100111011100101111000110111001000011110100011110000001010" }, - /*16*/ { BARCODE_RSS_EXP, "[91]a1234ABCDE", 1, 200, "ISO-646 followed by 9 non-ISO-646 terminating, starting 4 digits", + /*16*/ { BARCODE_DBAR_EXP, "[91]a1234ABCDE", 1, 200, "ISO-646 followed by 9 non-ISO-646 terminating, starting 4 digits", "01001000011000111010111111110000101100100001000001010110111111001110101111110000111000011011010001110000111000010101100011111100001010011100001011000100000010011011001011111111001110010011100000100101" }, - /*17*/ { BARCODE_RSS_EXP, "[91]aABCDEF12345b", 1, 249, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 6 letters", + /*17*/ { BARCODE_DBAR_EXP, "[91]aABCDEF12345b", 1, 249, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 6 letters", "010000100010100111101111111100001011001000010000010101101111110011101011111000000110100001110001011100010000010100011000111111000010111101000100100001100111010000110010111111110011101000001110011011000100000110101110001111000000101011110010001110010" }, - /*18*/ { BARCODE_RSS_EXP, "[91]aABCDEF1234b", 1, 249, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 6 letters", + /*18*/ { BARCODE_DBAR_EXP, "[91]aABCDEF1234b", 1, 249, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 6 letters", "010110111100110000101111111100001011001000010000010101101111110011101011111000000110100001110001011100010000010100011000111111000010111101000100100001100111010000110010111111110011101000001110011011000100001001110110001111000000101111110110110001010" }, - /*19*/ { BARCODE_RSS_EXP, "[91]aABCDE12345b", 1, 249, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 5 letters", + /*19*/ { BARCODE_DBAR_EXP, "[91]aABCDE12345b", 1, 249, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 5 letters", "010000100010011011101111111100001011001000010000010101101111110011101011111000000110100001110001011100010000010100011000111111000010111101000100100001100100001110011010111111110011100110110010000111000101111000101110001111000000101111011001101000010" }, - /*20*/ { BARCODE_RSS_EXP, "[91]aABCDE1234", 1, 200, "ISO-646 followed by 10 non-ISO-646 terminating, starting 5 letters", + /*20*/ { BARCODE_DBAR_EXP, "[91]aABCDE1234", 1, 200, "ISO-646 followed by 10 non-ISO-646 terminating, starting 5 letters", "01000101100011100010111111110000101100100001000001010110111111001110101111110000111010000111000101110001000001010001100011111100001011110100010010000110000100101111001011111111001110010010001110011101" }, - /*21*/ { BARCODE_RSS_EXP, "[91]aABCDE1234b", 1, 232, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 5 letters", + /*21*/ { BARCODE_DBAR_EXP, "[91]aABCDE1234b", 1, 232, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 5 letters", "0100010000110011011011111111000010110000010001011101011011111100111010111110000001100001000110110111010000010110000010001111110000101000011101001100011001000011100110101111111100111011001100100001110111001000011110100011110000001010" }, - /*22*/ { BARCODE_RSS_EXP, "[91]aABCDE1234", 1, 200, "ISO-646 followed by 9 non-ISO-646 terminating, starting 5 letters", + /*22*/ { BARCODE_DBAR_EXP, "[91]aABCDE1234", 1, 200, "ISO-646 followed by 9 non-ISO-646 terminating, starting 5 letters", "01000101100011100010111111110000101100100001000001010110111111001110101111110000111010000111000101110001000001010001100011111100001011110100010010000110000100101111001011111111001110010010001110011101" }, - /*23*/ { BARCODE_RSS_EXPSTACK, "[91]1", 1, 102, "Single numeric", + /*23*/ { BARCODE_DBAR_EXPSTK, "[91]1", 1, 102, "Single numeric", "010100000001000101101111111100001011001000010000010110111110101100001011110000000010101111100001011101" }, - /*24*/ { BARCODE_RSS_EXPSTACK, "[91]12", 1, 102, "2 numerics", + /*24*/ { BARCODE_DBAR_EXPSTK, "[91]12", 1, 102, "2 numerics", "010010000010000101101111111100001011001000010000010101111100101110001011110000000010101111100001011101" }, - /*25*/ { BARCODE_RSS_EXPSTACK, "[91]123", 1, 102, "Odd-numbered numeric", + /*25*/ { BARCODE_DBAR_EXPSTK, "[91]123", 1, 102, "Odd-numbered numeric", "010100000110000100101111111100001011001000010000010100011111010111001011110000000010000011000110100101" }, - /*26*/ { BARCODE_RSS_EXPSTACK, "[91]1234", 1, 102, "Even-numbered numeric", + /*26*/ { BARCODE_DBAR_EXPSTK, "[91]1234", 1, 102, "Even-numbered numeric", "010110010000001000101111111100001011001000010000010100111110001011101011110000000010001101111001011101" }, - /*27*/ { BARCODE_RSS_EXPSTACK, "[91]A1234567C", 5, 102, "Alphanumeric followed by 7 digits and alphanumeric **NOTE** bottom separator differs from tec-it, same as BWIPP", + /*27*/ { BARCODE_DBAR_EXPSTK, "[91]A1234567C", 5, 102, "Alphanumeric followed by 7 digits and alphanumeric **NOTE** bottom separator differs from tec-it, same as BWIPP", "010100000111001001101111111100001011000001000101110101111110111101001011111100001110100110111110111101" "000011111000110110010000000010100100111110111010001010000001000010110100000010100001011001000001000000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000000100000000101101000010000100010010011111011100100101000000101001100101000011000000000000000000000" "101110011111111010010111101111011101101100000100011010000111111000110011010111100001000000000000000000" }, - /*28*/ { BARCODE_RSS_EXPSTACK, "[91]A123456C", 5, 102, "Alphanumeric followed by 6 digits and alphanumeric **NOTE** bottom separator differs from tec-it, same as BWIPP", + /*28*/ { BARCODE_DBAR_EXPSTK, "[91]A123456C", 5, 102, "Alphanumeric followed by 6 digits and alphanumeric **NOTE** bottom separator differs from tec-it, same as BWIPP", "010110011100100000101111111100001011001000010000010101111110111101001011110000001110100110111110111101" "000001100011011111010000000010100100110111101111101010000001000010110100001010100001011001000001000000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001100001010011001010000001010010111011100111000000000000000000000000000000000000000000000000000000" "001000011110101100110001111110000101000100011000111010000000000000000000000000000000000000000000000000" }, - /*29*/ { BARCODE_RSS_EXPSTACK, "[91]A12345B", 5, 102, "Alphanumeric followed by 5 digits and alphanumeric **NOTE** ditto", + /*29*/ { BARCODE_DBAR_EXPSTK, "[91]A12345B", 5, 102, "Alphanumeric followed by 5 digits and alphanumeric **NOTE** ditto", "010111100100000100101111111100001011001000010000010101111110111101001011110000001110000001011100100101" "000000011011111011010000000010100100110111101111101010000001000010110100001010100001111110100011010000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001111000010111101010000001010010011111110110100000000000000000000000000000000000000000000000000000" "001010000111101000010001111110000101100000001001010010000000000000000000000000000000000000000000000000" }, - /*30*/ { BARCODE_RSS_EXPSTACK, "[91]A1234567", 5, 102, "Alphanumeric followed by 7 digits, terminating **NOTE** ditto", + /*30*/ { BARCODE_DBAR_EXPSTK, "[91]A1234567", 5, 102, "Alphanumeric followed by 7 digits, terminating **NOTE** ditto", "010110010001110000101111111100001011001000010000010101111110111101001011110000001110100110111110111101" "000001101110001111010000000010100100110111101111101010000001000010110100001010100001011001000001000000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001100001001011001010000001010010010100001000010000000000000000000000000000000000000000000000000000" "001000011110110100110001111110000101101011110111100010000000000000000000000000000000000000000000000000" }, - /*31*/ { BARCODE_RSS_EXPSTACK, "[91]A123456", 5, 102, "Alphanumeric followed by 6 digits, terminating **NOTE** ditto", + /*31*/ { BARCODE_DBAR_EXPSTK, "[91]A123456", 5, 102, "Alphanumeric followed by 6 digits, terminating **NOTE** ditto", "010100001100111000101111111100001011001000010000010101111110111101001011110000001110100110111110111101" "000011110011000111010000000010100100110111101111101010000001000010110100001010100001011001000001000000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001100001010011001010000001010010011101011111110000000000000000000000000000000000000000000000000000" "001000011110101100110001111110000101100010100000001010000000000000000000000000000000000000000000000000" }, - /*32*/ { BARCODE_RSS_EXPSTACK, "[91]A12345", 5, 102, "Alphanumeric followed by 5 digits, terminating **NOTE** ditto", + /*32*/ { BARCODE_DBAR_EXPSTK, "[91]A12345", 5, 102, "Alphanumeric followed by 5 digits, terminating **NOTE** ditto", "010100100011000011101111111100001011001000010000010101111110111101001011110000001110100110111110111101" "000011011100111100010000000010100100110111101111101010000001000010110100001010100001011001000001000000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001101001100000101010000001010010011101011111110000000000000000000000000000000000000000000000000000" "001000010110011111010001111110000101100010100000001010000000000000000000000000000000000000000000000000" }, - /*33*/ { BARCODE_RSS_EXPSTACK, "[91]A1234", 5, 102, "Alphanumeric followed by 4 digits, terminating **NOTE** ditto", + /*33*/ { BARCODE_DBAR_EXPSTK, "[91]A1234", 5, 102, "Alphanumeric followed by 4 digits, terminating **NOTE** ditto", "010111000010010001101111111100001011001000010000010101111110111101001011110000001110100110111110111101" "000000111101101110010000000010100100110111101111101010000001000010110100001010100001011001000001000000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001001000001101101010000001010010000111011101110000000000000000000000000000000000000000000000000000" "001000110111110010010001111110000101111000100010001010000000000000000000000000000000000000000000000000" }, - /*34*/ { BARCODE_RSS_EXPSTACK, "[91]A123", 5, 102, "Alphanumeric followed by 3 digits, terminating **NOTE** ditto", + /*34*/ { BARCODE_DBAR_EXPSTK, "[91]A123", 5, 102, "Alphanumeric followed by 3 digits, terminating **NOTE** ditto", "010110000100111000101111111100001011001000010000010101111110111101001011110000001110000001011100100101" "000001111011000111010000000010100100110111101111101010000001000010110100001010100001111110100011010000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001011110111101001010000001010010101111100001010000000000000000000000000000000000000000000000000000" "001000100001000010110001111110000101010000011110100010000000000000000000000000000000000000000000000000" }, - /*35*/ { BARCODE_RSS_EXPSTACK, "[91]a1234ABCDEFGb", 9, 102, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 4 digits **NOTE** separators differ from tec-it, same as BWIPP", + /*35*/ { BARCODE_DBAR_EXPSTK, "[91]a1234ABCDEFGb", 9, 102, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 4 digits **NOTE** separators differ from tec-it, same as BWIPP", "010000100011100110101111111100001011001000010000010101101111110011101011111000000110000110110100011101" "000011011100011001010000000010100100110111101111101010010000001100010100000101010001111001001011100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -844,7 +844,7 @@ static void test_general_field(int index, int generate, int debug) { "000011001000000110010100001010100100010001011001100000000000000000000000000000000000000000000000000000" "010100110111111001100011110000001011101110100110000100000000000000000000000000000000000000000000000000" }, - /*36*/ { BARCODE_RSS_EXPSTACK, "[91]a1234ABCDEFb", 9, 102, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 4 digits **NOTE** top separator differs from tec-it, same as BWIPP", + /*36*/ { BARCODE_DBAR_EXPSTK, "[91]a1234ABCDEFb", 9, 102, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 4 digits **NOTE** top separator differs from tec-it, same as BWIPP", "010111010001110001101111111100001011001000010000010101101111110011101011111000000110000110110100011101" "000000101110001110010000000010100100110111101111101010010000001100010100000101010001111001001011100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -855,7 +855,7 @@ static void test_general_field(int index, int generate, int debug) { "000000111001000110010100001010100100101110001100000000000000000000000000000000000000000000000000000000" "010011000110111001100011110000001011010001110011100100000000000000000000000000000000000000000000000000" }, - /*37*/ { BARCODE_RSS_EXPSTACK, "[91]a1234ABCDEF", 9, 102, "ISO-646 followed by 10 non-ISO-646 terminating, starting 4 digits **NOTE** separators differ from tec-it, same as BWIPP", + /*37*/ { BARCODE_DBAR_EXPSTK, "[91]a1234ABCDEF", 9, 102, "ISO-646 followed by 10 non-ISO-646 terminating, starting 4 digits **NOTE** separators differ from tec-it, same as BWIPP", "010110111001000011101111111100001011001000010000010101101111110011101011111000000110000110110100011101" "000001000110111100010000000010100100110111101111101010010000001100010100000101010001111001001011100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -866,7 +866,7 @@ static void test_general_field(int index, int generate, int debug) { "000000011000111010010100001010100101011111000010100000000000000000000000000000000000000000000000000000" "010011100111000101100011110000001010100000111101000100000000000000000000000000000000000000000000000000" }, - /*38*/ { BARCODE_RSS_EXPSTACK, "[91]a1234ABCDEb", 9, 102, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 4 digits **NOTE** ditto", + /*38*/ { BARCODE_DBAR_EXPSTK, "[91]a1234ABCDEb", 9, 102, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 4 digits **NOTE** ditto", "010110111001100001101111111100001011001000010000010101101111110011101011111000000110010001110010011101" "000001000110011110010000000010100100110111101111101010010000001100010100000101010001101110001101100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -877,14 +877,14 @@ static void test_general_field(int index, int generate, int debug) { "000000110111100001010100001010100101011111000010100000000000000000000000000000000000000000000000000000" "010111001000011110100011110000001010100000111101000100000000000000000000000000000000000000000000000000" }, - /*39*/ { BARCODE_RSS_EXPSTACK, "[91]a1234ABCDE", 5, 102, "ISO-646 followed by 9 non-ISO-646 terminating, starting 4 digits **NOTE** bottom separator differs from tec-it, same as BWIPP", + /*39*/ { BARCODE_DBAR_EXPSTK, "[91]a1234ABCDE", 5, 102, "ISO-646 followed by 9 non-ISO-646 terminating, starting 4 digits **NOTE** bottom separator differs from tec-it, same as BWIPP", "010010000110001110101111111100001011001000010000010101101111110011101011111100001110000110110100011101" "000001111001110001010000000010100100110111101111101010010000001100010100000010100001111001001011100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000010111110001101100001000000001011001001101111110111001011110001101001010000001010010101111000110000" "101001000001110010011100111111110100110110010000001000110100001110010100001111110001101010000111000010" }, - /*40*/ { BARCODE_RSS_EXPSTACK, "[91]aABCDEF12345b", 9, 102, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 6 letters **NOTE** top separator differs from tec-it, same as BWIPP", + /*40*/ { BARCODE_DBAR_EXPSTK, "[91]aABCDEF12345b", 9, 102, "ISO-646 followed by 11 non-ISO-646 non-terminating, starting 6 letters **NOTE** top separator differs from tec-it, same as BWIPP", "010000100010100111101111111100001011001000010000010101101111110011101011111000000110100001110001011101" "000011011101011000010000000010100100110111101111101010010000001100010100000101010001011110001110100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -895,7 +895,7 @@ static void test_general_field(int index, int generate, int debug) { "000010111110010100010100001010100101000011011100000000000000000000000000000000000000000000000000000000" "010001000001101011100011110000001010111100100011100100000000000000000000000000000000000000000000000000" }, - /*41*/ { BARCODE_RSS_EXPSTACK, "[91]aABCDEF1234b", 9, 102, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 6 letters **NOTE** separators differ from tec-it, same as BWIPP", + /*41*/ { BARCODE_DBAR_EXPSTK, "[91]aABCDEF1234b", 9, 102, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 6 letters **NOTE** separators differ from tec-it, same as BWIPP", "010110111100110000101111111100001011001000010000010101101111110011101011111000000110100001110001011101" "000001000011001111010000000010100100110111101111101010010000001100010100000101010001011110001110100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -906,7 +906,7 @@ static void test_general_field(int index, int generate, int debug) { "000010111101100010010100001010100100000010010011100000000000000000000000000000000000000000000000000000" "010001000010011101100011110000001011111101101100010100000000000000000000000000000000000000000000000000" }, - /*42*/ { BARCODE_RSS_EXPSTACK, "[91]aABCDE12345b", 9, 102, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 5 letters **NOTE** ditto", + /*42*/ { BARCODE_DBAR_EXPSTK, "[91]aABCDE12345b", 9, 102, "ISO-646 followed by 10 non-ISO-646 non-terminating, starting 5 letters **NOTE** ditto", "010000100010011011101111111100001011001000010000010101101111110011101011111000000110100001110001011101" "000011011101100100010000000010100100110111101111101010010000001100010100000101010001011110001110100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -917,14 +917,14 @@ static void test_general_field(int index, int generate, int debug) { "000010100001110100010100001010100100001001100101100000000000000000000000000000000000000000000000000000" "010001011110001011100011110000001011110110011010000100000000000000000000000000000000000000000000000000" }, - /*43*/ { BARCODE_RSS_EXPSTACK, "[91]aABCDE1234", 5, 102, "ISO-646 followed by 10 non-ISO-646 terminating, starting 5 letters **NOTE** bottom separator differs from tec-it, same as BWIPP", + /*43*/ { BARCODE_DBAR_EXPSTK, "[91]aABCDE1234", 5, 102, "ISO-646 followed by 10 non-ISO-646 terminating, starting 5 letters **NOTE** bottom separator differs from tec-it, same as BWIPP", "010001011000111000101111111100001011001000010000010101101111110011101011111100001110100001110001011101" "000010100111000111010000000010100100110111101111101010010000001100010100000010100001011110001110100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" "000001100011101101100001000000001011000010110111100111101101110100001001010000001010011101011111010000" "101110011100010010011100111111110100111101001000011000010010001011110100001111110001100010100000100010" }, - /*44*/ { BARCODE_RSS_EXPSTACK, "[91]aABCDE1234b", 9, 102, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 5 letters **NOTE** separators differ from tec-it, same as BWIPP", + /*44*/ { BARCODE_DBAR_EXPSTK, "[91]aABCDE1234b", 9, 102, "ISO-646 followed by 9 non-ISO-646 non-terminating, starting 5 letters **NOTE** separators differ from tec-it, same as BWIPP", "010000100001110110101111111100001011001000010000010101101111110011101011111000000110000100011011011101" "000011011110001001010000000010100100110111101111101010010000001100010100000101010001111011100100100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -935,7 +935,7 @@ static void test_general_field(int index, int generate, int debug) { "000000110111100001010100001010100101011111000010100000000000000000000000000000000000000000000000000000" "010111001000011110100011110000001010100000111101000100000000000000000000000000000000000000000000000000" }, - /*45*/ { BARCODE_RSS_EXPSTACK, "[91]aABCDE1234", 5, 102, "ISO-646 followed by 9 non-ISO-646 terminating, starting 5 letters **NOTE** bottom separator differs from tec-it, same as BWIPP", + /*45*/ { BARCODE_DBAR_EXPSTK, "[91]aABCDE1234", 5, 102, "ISO-646 followed by 9 non-ISO-646 terminating, starting 5 letters **NOTE** bottom separator differs from tec-it, same as BWIPP", "010001011000111000101111111100001011001000010000010101101111110011101011111100001110100001110001011101" "000010100111000111010000000010100100110111101111101010010000001100010100000010100001011110001110100000" "000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000" @@ -1012,7 +1012,7 @@ static void test_binary_buffer_size(int index, int generate, int debug) { struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - symbol->symbology = BARCODE_RSS_EXP; + symbol->symbology = BARCODE_DBAR_EXP; symbol->debug |= debug; int length = strlen(data[i].data); @@ -1047,15 +1047,15 @@ static void test_hrt(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_RSS14, "1234567890123", "(01)12345678901231" }, - /* 1*/ { BARCODE_RSS14, "12345678901231", "(01)12345678901231" }, - /* 2*/ { BARCODE_RSS14, "1000000000009", "(01)10000000000090" }, - /* 3*/ { BARCODE_RSS_LTD, "1341056790138", "(01)13410567901384" }, - /* 4*/ { BARCODE_RSS_LTD, "13410567901384", "(01)13410567901384" }, - /* 5*/ { BARCODE_RSS_EXP, "[01]12345678901234", "(01)12345678901234" }, - /* 6*/ { BARCODE_RSS14STACK, "12345678901231", "" }, - /* 7*/ { BARCODE_RSS14STACK_OMNI, "10000000000090", "" }, - /* 8*/ { BARCODE_RSS_EXPSTACK, "[01]12345678901234", "" }, + /* 0*/ { BARCODE_DBAR_OMN, "1234567890123", "(01)12345678901231" }, + /* 1*/ { BARCODE_DBAR_OMN, "12345678901231", "(01)12345678901231" }, + /* 2*/ { BARCODE_DBAR_OMN, "1000000000009", "(01)10000000000090" }, + /* 3*/ { BARCODE_DBAR_LTD, "1341056790138", "(01)13410567901384" }, + /* 4*/ { BARCODE_DBAR_LTD, "13410567901384", "(01)13410567901384" }, + /* 5*/ { BARCODE_DBAR_EXP, "[01]12345678901234", "(01)12345678901234" }, + /* 6*/ { BARCODE_DBAR_STK, "12345678901231", "" }, + /* 7*/ { BARCODE_DBAR_OMNSTK, "10000000000090", "" }, + /* 8*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901234", "" }, }; int data_size = ARRAY_SIZE(data); @@ -1095,30 +1095,30 @@ static void test_input(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_RSS14, "1234567890123", 0, 1, 96 }, - /* 1*/ { BARCODE_RSS14, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 2*/ { BARCODE_RSS14, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1 }, - /* 3*/ { BARCODE_RSS14, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 4*/ { BARCODE_RSS_LTD, "1234567890123", 0, 1, 74 }, - /* 5*/ { BARCODE_RSS_LTD, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 6*/ { BARCODE_RSS_LTD, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1 }, - /* 7*/ { BARCODE_RSS_LTD, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 8*/ { BARCODE_RSS_LTD, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 9*/ { BARCODE_RSS_LTD, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 10*/ { BARCODE_RSS_EXP, "[01]12345678901234", 0, 1, 134 }, - /* 11*/ { BARCODE_RSS_EXP, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 12*/ { BARCODE_RSS_EXP, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 13*/ { BARCODE_RSS14STACK, "1234567890123", 0, 3, 50 }, - /* 14*/ { BARCODE_RSS14STACK, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 15*/ { BARCODE_RSS14STACK, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1 }, - /* 16*/ { BARCODE_RSS14STACK, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 17*/ { BARCODE_RSS14STACK_OMNI, "1234567890123", 0, 5, 50 }, - /* 18*/ { BARCODE_RSS14STACK_OMNI, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 19*/ { BARCODE_RSS14STACK_OMNI, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1 }, - /* 20*/ { BARCODE_RSS14STACK_OMNI, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 21*/ { BARCODE_RSS_EXPSTACK, "[01]12345678901234", 0, 5, 102 }, - /* 22*/ { BARCODE_RSS_EXPSTACK, "[01]123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, - /* 23*/ { BARCODE_RSS_EXPSTACK, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 0*/ { BARCODE_DBAR_OMN, "1234567890123", 0, 1, 96 }, + /* 1*/ { BARCODE_DBAR_OMN, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 2*/ { BARCODE_DBAR_OMN, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1 }, + /* 3*/ { BARCODE_DBAR_OMN, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 4*/ { BARCODE_DBAR_LTD, "1234567890123", 0, 1, 74 }, + /* 5*/ { BARCODE_DBAR_LTD, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 6*/ { BARCODE_DBAR_LTD, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1 }, + /* 7*/ { BARCODE_DBAR_LTD, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 8*/ { BARCODE_DBAR_LTD, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 9*/ { BARCODE_DBAR_LTD, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 10*/ { BARCODE_DBAR_EXP, "[01]12345678901234", 0, 1, 134 }, + /* 11*/ { BARCODE_DBAR_EXP, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 12*/ { BARCODE_DBAR_EXP, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 13*/ { BARCODE_DBAR_STK, "1234567890123", 0, 3, 50 }, + /* 14*/ { BARCODE_DBAR_STK, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 15*/ { BARCODE_DBAR_STK, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1 }, + /* 16*/ { BARCODE_DBAR_STK, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 17*/ { BARCODE_DBAR_OMNSTK, "1234567890123", 0, 5, 50 }, + /* 18*/ { BARCODE_DBAR_OMNSTK, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 19*/ { BARCODE_DBAR_OMNSTK, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1 }, + /* 20*/ { BARCODE_DBAR_OMNSTK, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 21*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901234", 0, 5, 102 }, + /* 22*/ { BARCODE_DBAR_EXPSTK, "[01]123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 }, + /* 23*/ { BARCODE_DBAR_EXPSTK, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1 }, }; int data_size = ARRAY_SIZE(data); diff --git a/backend/tests/test_vector.c b/backend/tests/test_vector.c index 4b0e5293..2757bd88 100644 --- a/backend/tests/test_vector.c +++ b/backend/tests/test_vector.c @@ -139,7 +139,7 @@ static void test_buffer_vector(int index, int generate, int debug) { }; struct item data[] = { /* 0*/ { BARCODE_CODE11, "0000000000", "", 50, 1, 99, 198, 118 }, - /* 1*/ { BARCODE_C25MATRIX, "0000000000", "", 50, 1, 117, 234, 118 }, + /* 1*/ { BARCODE_C25STANDARD, "0000000000", "", 50, 1, 117, 234, 118 }, /* 2*/ { BARCODE_C25INTER, "0000000000", "", 50, 1, 99, 198, 118 }, /* 3*/ { BARCODE_C25IATA, "0000000000", "", 50, 1, 149, 298, 118 }, /* 4*/ { BARCODE_C25LOGIC, "0000000000", "", 50, 1, 109, 218, 118 }, @@ -162,7 +162,7 @@ static void test_buffer_vector(int index, int generate, int debug) { /* 21*/ { BARCODE_EANX_CHK, "1234", "", 50, 1, 47, 118, 118 }, /* 22*/ { BARCODE_EANX, "12", "", 50, 1, 20, 64, 118 }, /* 23*/ { BARCODE_EANX_CHK, "12", "", 50, 1, 20, 64, 118 }, - /* 24*/ { BARCODE_EAN128, "[01]12345678901234", "", 50, 1, 134, 268, 118 }, + /* 24*/ { BARCODE_GS1_128, "[01]12345678901234", "", 50, 1, 134, 268, 118 }, /* 25*/ { BARCODE_CODABAR, "A00000000B", "", 50, 1, 102, 204, 118 }, /* 26*/ { BARCODE_CODE128, "0000000000", "", 50, 1, 90, 180, 118 }, /* 27*/ { BARCODE_DPLEIT, "1234567890123", "", 50, 1, 135, 270, 118 }, @@ -171,9 +171,9 @@ static void test_buffer_vector(int index, int generate, int debug) { /* 30*/ { BARCODE_CODE49, "0000000000", "", 20, 2, 70, 162, 44 }, /* 31*/ { BARCODE_CODE93, "0000000000", "", 50, 1, 127, 254, 118 }, /* 32*/ { BARCODE_FLAT, "1234567890", "", 50, 1, 90, 180, 100 }, - /* 33*/ { BARCODE_RSS14, "1234567890123", "", 50, 1, 96, 192, 118 }, - /* 34*/ { BARCODE_RSS_LTD, "1234567890123", "", 50, 1, 74, 148, 118 }, - /* 35*/ { BARCODE_RSS_EXP, "[01]12345678901234", "", 34, 1, 134, 268, 86 }, + /* 33*/ { BARCODE_DBAR_OMN, "1234567890123", "", 50, 1, 96, 192, 118 }, + /* 34*/ { BARCODE_DBAR_LTD, "1234567890123", "", 50, 1, 74, 148, 118 }, + /* 35*/ { BARCODE_DBAR_EXP, "[01]12345678901234", "", 34, 1, 134, 268, 86 }, /* 36*/ { BARCODE_TELEPEN, "0000000000", "", 50, 1, 208, 416, 118 }, /* 37*/ { BARCODE_UPCA, "12345678904", "", 50, 1, 95, 226, 118 }, /* 38*/ { BARCODE_UPCA_CHK, "123456789043", "", 50, 1, 95, 226, 118 }, @@ -214,12 +214,12 @@ static void test_buffer_vector(int index, int generate, int debug) { /* 73*/ { BARCODE_NVE18, "12345678901234567", "", 50, 1, 156, 312, 118 }, /* 74*/ { BARCODE_JAPANPOST, "0000000000", "", 8, 3, 133, 266, 16 }, /* 75*/ { BARCODE_KOREAPOST, "123456", "", 50, 1, 167, 334, 118 }, - /* 76*/ { BARCODE_RSS14STACK, "0000000000000", "", 13, 3, 50, 100, 26 }, - /* 77*/ { BARCODE_RSS14STACK_OMNI, "0000000000000", "", 69, 5, 50, 100, 138 }, - /* 78*/ { BARCODE_RSS_EXPSTACK, "[01]12345678901234", "", 71, 5, 102, 204, 142 }, + /* 76*/ { BARCODE_DBAR_STK, "0000000000000", "", 13, 3, 50, 100, 26 }, + /* 77*/ { BARCODE_DBAR_OMNSTK, "0000000000000", "", 69, 5, 50, 100, 138 }, + /* 78*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901234", "", 71, 5, 102, 204, 142 }, /* 79*/ { BARCODE_PLANET, "00000000000", "", 12, 2, 185, 370, 24 }, /* 80*/ { BARCODE_MICROPDF417, "0000000000", "", 12, 6, 82, 164, 24 }, - /* 81*/ { BARCODE_ONECODE, "12345678901234567890", "", 8, 3, 129, 258, 16 }, + /* 81*/ { BARCODE_USPS_IMAIL, "12345678901234567890", "", 8, 3, 129, 258, 16 }, /* 82*/ { BARCODE_PLESSEY, "0000000000", "", 50, 1, 227, 454, 118 }, /* 83*/ { BARCODE_TELEPEN_NUM, "0000000000", "", 50, 1, 128, 256, 118 }, /* 84*/ { BARCODE_ITF14, "0000000000", "", 50, 1, 135, 330, 138 }, @@ -243,19 +243,19 @@ static void test_buffer_vector(int index, int generate, int debug) { /*102*/ { BARCODE_EANX_CC, "123456789012", "[20]01", 50, 7, 99, 234, 118 }, /*103*/ { BARCODE_EANX_CC, "123456789012+12", "[20]01", 50, 7, 126, 284, 118 }, /*104*/ { BARCODE_EANX_CC, "123456789012+12345", "[20]01", 50, 7, 153, 338, 118 }, - /*105*/ { BARCODE_EAN128_CC, "[01]12345678901234", "[20]01", 50, 5, 145, 290, 118 }, - /*106*/ { BARCODE_RSS14_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 60 }, - /*107*/ { BARCODE_RSS_LTD_CC, "1234567890123", "[20]01", 19, 6, 74, 148, 56 }, - /*108*/ { BARCODE_RSS_EXP_CC, "[01]12345678901234", "[20]01", 41, 5, 134, 268, 100 }, + /*105*/ { BARCODE_GS1_128_CC, "[01]12345678901234", "[20]01", 50, 5, 145, 290, 118 }, + /*106*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 60 }, + /*107*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 19, 6, 74, 148, 56 }, + /*108*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901234", "[20]01", 41, 5, 134, 268, 100 }, /*109*/ { BARCODE_UPCA_CC, "12345678901", "[20]01", 50, 7, 99, 234, 118 }, /*110*/ { BARCODE_UPCA_CC, "12345678901+12", "[20]01", 50, 7, 128, 284, 118 }, /*111*/ { BARCODE_UPCA_CC, "12345678901+12345", "[20]01", 50, 7, 155, 338, 118 }, /*112*/ { BARCODE_UPCE_CC, "1234567", "[20]01", 50, 9, 55, 142, 118 }, /*113*/ { BARCODE_UPCE_CC, "1234567+12", "[20]01", 50, 9, 82, 192, 118 }, /*114*/ { BARCODE_UPCE_CC, "1234567+12345", "[20]01", 50, 9, 109, 246, 118 }, - /*115*/ { BARCODE_RSS14STACK_CC, "0000000000000", "[20]01", 24, 9, 56, 112, 48 }, - /*116*/ { BARCODE_RSS14_OMNI_CC, "0000000000000", "[20]01", 80, 11, 56, 112, 160 }, - /*117*/ { BARCODE_RSS_EXPSTACK_CC, "[01]12345678901234", "[20]01", 78, 9, 102, 204, 156 }, + /*115*/ { BARCODE_DBAR_STK_CC, "0000000000000", "[20]01", 24, 9, 56, 112, 48 }, + /*116*/ { BARCODE_DBAR_OMNSTK_CC, "0000000000000", "[20]01", 80, 11, 56, 112, 160 }, + /*117*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901234", "[20]01", 78, 9, 102, 204, 156 }, /*118*/ { BARCODE_CHANNEL, "00", "", 50, 1, 19, 38, 118 }, /*119*/ { BARCODE_CODEONE, "12345678901234567890", "", 22, 22, 22, 44, 44 }, /*120*/ { BARCODE_GRIDMATRIX, "ABC", "", 18, 18, 18, 36, 36 }, @@ -615,9 +615,9 @@ static void test_noncomposite_string_x(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%2d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_RSS14, "1234567890123", 96, 96 }, - /* 1*/ { BARCODE_RSS_LTD, "1234567890123", 74, 74 }, - /* 2*/ { BARCODE_RSS_EXP, "[01]12345678901234", 134, 134 }, + /* 0*/ { BARCODE_DBAR_OMN, "1234567890123", 96, 96 }, + /* 1*/ { BARCODE_DBAR_LTD, "1234567890123", 74, 74 }, + /* 2*/ { BARCODE_DBAR_EXP, "[01]12345678901234", 134, 134 }, }; int data_size = sizeof(data) / sizeof(struct item); diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c index c15095ec..815eb823 100644 --- a/backend/tests/testcommon.c +++ b/backend/tests/testcommon.c @@ -232,7 +232,7 @@ char *testUtilBarcodeName(int symbology) { struct item data[] = { { "", -1, 0 }, { "BARCODE_CODE11", BARCODE_CODE11, 1 }, - { "BARCODE_C25MATRIX", BARCODE_C25MATRIX, 2 }, + { "BARCODE_C25STANDARD", BARCODE_C25STANDARD, 2 }, { "BARCODE_C25INTER", BARCODE_C25INTER, 3 }, { "BARCODE_C25IATA", BARCODE_C25IATA, 4 }, { "", -1, 5 }, @@ -246,7 +246,7 @@ char *testUtilBarcodeName(int symbology) { { "BARCODE_EANX", BARCODE_EANX, 13 }, { "BARCODE_EANX_CHK", BARCODE_EANX_CHK, 14 }, { "", -1, 15 }, - { "BARCODE_EAN128", BARCODE_EAN128, 16 }, + { "BARCODE_GS1_128", BARCODE_GS1_128, 16 }, { "", -1, 17 }, { "BARCODE_CODABAR", BARCODE_CODABAR, 18 }, { "", -1, 19 }, @@ -259,9 +259,9 @@ char *testUtilBarcodeName(int symbology) { { "", -1, 26 }, { "", -1, 27 }, { "BARCODE_FLAT", BARCODE_FLAT, 28 }, - { "BARCODE_RSS14", BARCODE_RSS14, 29 }, - { "BARCODE_RSS_LTD", BARCODE_RSS_LTD, 30 }, - { "BARCODE_RSS_EXP", BARCODE_RSS_EXP, 31 }, + { "BARCODE_DBAR_OMN", BARCODE_DBAR_OMN, 29 }, + { "BARCODE_DBAR_LTD", BARCODE_DBAR_LTD, 30 }, + { "BARCODE_DBAR_EXP", BARCODE_DBAR_EXP, 31 }, { "BARCODE_TELEPEN", BARCODE_TELEPEN, 32 }, { "", -1, 33 }, { "BARCODE_UPCA", BARCODE_UPCA, 34 }, @@ -309,13 +309,13 @@ char *testUtilBarcodeName(int symbology) { { "BARCODE_JAPANPOST", BARCODE_JAPANPOST, 76 }, { "BARCODE_KOREAPOST", BARCODE_KOREAPOST, 77 }, { "", -1, 78 }, - { "BARCODE_RSS14STACK", BARCODE_RSS14STACK, 79 }, - { "BARCODE_RSS14STACK_OMNI", BARCODE_RSS14STACK_OMNI, 80 }, - { "BARCODE_RSS_EXPSTACK", BARCODE_RSS_EXPSTACK, 81 }, + { "BARCODE_DBAR_STK", BARCODE_DBAR_STK, 79 }, + { "BARCODE_DBAR_OMNSTK", BARCODE_DBAR_OMNSTK, 80 }, + { "BARCODE_DBAR_EXPSTK", BARCODE_DBAR_EXPSTK, 81 }, { "BARCODE_PLANET", BARCODE_PLANET, 82 }, { "", -1, 83 }, { "BARCODE_MICROPDF417", BARCODE_MICROPDF417, 84 }, - { "BARCODE_ONECODE", BARCODE_ONECODE, 85 }, + { "BARCODE_USPS_IMAIL", BARCODE_USPS_IMAIL, 85 }, { "BARCODE_PLESSEY", BARCODE_PLESSEY, 86 }, { "BARCODE_TELEPEN_NUM", BARCODE_TELEPEN_NUM, 87 }, { "", -1, 88 }, @@ -361,15 +361,15 @@ char *testUtilBarcodeName(int symbology) { { "BARCODE_AZRUNE", BARCODE_AZRUNE, 128 }, { "BARCODE_CODE32", BARCODE_CODE32, 129 }, { "BARCODE_EANX_CC", BARCODE_EANX_CC, 130 }, - { "BARCODE_EAN128_CC", BARCODE_EAN128_CC, 131 }, - { "BARCODE_RSS14_CC", BARCODE_RSS14_CC, 132 }, - { "BARCODE_RSS_LTD_CC", BARCODE_RSS_LTD_CC, 133 }, - { "BARCODE_RSS_EXP_CC", BARCODE_RSS_EXP_CC, 134 }, + { "BARCODE_GS1_128_CC", BARCODE_GS1_128_CC, 131 }, + { "BARCODE_DBAR_OMN_CC", BARCODE_DBAR_OMN_CC, 132 }, + { "BARCODE_DBAR_LTD_CC", BARCODE_DBAR_LTD_CC, 133 }, + { "BARCODE_DBAR_EXP_CC", BARCODE_DBAR_EXP_CC, 134 }, { "BARCODE_UPCA_CC", BARCODE_UPCA_CC, 135 }, { "BARCODE_UPCE_CC", BARCODE_UPCE_CC, 136 }, - { "BARCODE_RSS14STACK_CC", BARCODE_RSS14STACK_CC, 137 }, - { "BARCODE_RSS14_OMNI_CC", BARCODE_RSS14_OMNI_CC, 138 }, - { "BARCODE_RSS_EXPSTACK_CC", BARCODE_RSS_EXPSTACK_CC, 139 }, + { "BARCODE_DBAR_STK_CC", BARCODE_DBAR_STK_CC, 137 }, + { "BARCODE_DBAR_OMNSTK_CC", BARCODE_DBAR_OMNSTK_CC, 138 }, + { "BARCODE_DBAR_EXPSTK_CC", BARCODE_DBAR_EXPSTK_CC, 139 }, { "BARCODE_CHANNEL", BARCODE_CHANNEL, 140 }, { "BARCODE_CODEONE", BARCODE_CODEONE, 141 }, { "BARCODE_GRIDMATRIX", BARCODE_GRIDMATRIX, 142 }, @@ -1469,7 +1469,7 @@ static char *testUtilBwippName(int symbology, int option_1, int option_2, int op struct item data[] = { { "", -1, 0, 0, 0, 0, 0, 0, }, { "code11", BARCODE_CODE11, 1, 0, 1, 0, 0, 0, }, - { "matrix2of5", BARCODE_C25MATRIX, 2, 0, 0, 0, 0, 0, }, + { "matrix2of5", BARCODE_C25STANDARD, 2, 0, 0, 0, 0, 0, }, { "interleaved2of5", BARCODE_C25INTER, 3, 0, 0, 0, 0, 0, }, { "iata2of5", BARCODE_C25IATA, 4, 0, 0, 0, 0, 0, }, { "", -1, 5, 0, 0, 0, 0, 0, }, @@ -1483,7 +1483,7 @@ static char *testUtilBwippName(int symbology, int option_1, int option_2, int op { "ean13", BARCODE_EANX, 13, 0, 1, 0, 0, 1 /*gs1_cvt*/, }, { "ean13", BARCODE_EANX_CHK, 14, 0, 1, 0, 0, 1, }, { "", -1, 15, 0, 0, 0, 0, 0, }, - { "gs1-128", BARCODE_EAN128, 16, 0, 0, 0, 0, 1 /*gs1_cvt*/, }, + { "gs1-128", BARCODE_GS1_128, 16, 0, 0, 0, 0, 1 /*gs1_cvt*/, }, { "", -1, 17, 0, 0, 0, 0, 0, }, { "rationalizedCodabar", BARCODE_CODABAR, 18, 0, 0, 0, 0, 0, }, { "", -1, 19, 0, 0, 0, 0, 0, }, @@ -1496,9 +1496,9 @@ static char *testUtilBwippName(int symbology, int option_1, int option_2, int op { "", -1, 26, 0, 0, 0, 0, 0, }, { "", -1, 27, 0, 0, 0, 0, 0, }, { "flattermarken", BARCODE_FLAT, 28, 0, 0, 0, 0, 0, }, - { "databaromni", BARCODE_RSS14, 29, 0, 0, 0, 0, 1 /*gs1_cvt*/, }, - { "databarlimited", BARCODE_RSS_LTD, 30, 0, 0, 0, 0, 1, }, - { "databarexpanded", BARCODE_RSS_EXP, 31, 0, 1, 0, 1 /*linear_row_height*/, 1, }, + { "databaromni", BARCODE_DBAR_OMN, 29, 0, 0, 0, 0, 1 /*gs1_cvt*/, }, + { "databarlimited", BARCODE_DBAR_LTD, 30, 0, 0, 0, 0, 1, }, + { "databarexpanded", BARCODE_DBAR_EXP, 31, 0, 1, 0, 1 /*linear_row_height*/, 1, }, { "telepen", BARCODE_TELEPEN, 32, 0, 0, 0, 0, 0, }, { "", -1, 33, 0, 0, 0, 0, 0, }, { "upca", BARCODE_UPCA, 34, 0, 1, 0, 0, 1 /*gs1_cvt*/, }, @@ -1546,13 +1546,13 @@ static char *testUtilBwippName(int symbology, int option_1, int option_2, int op { "japanpost", BARCODE_JAPANPOST, 76, 0, 0, 0, 0, 0, }, { "", BARCODE_KOREAPOST, 77, 0, 0, 0, 0, 0, }, { "", -1, 78, 0, 0, 0, 0, 0, }, - { "databarstacked", BARCODE_RSS14STACK, 79, 0, 0, 0, 0, 1 /*gs1_cvt*/, }, - { "databarstackedomni", BARCODE_RSS14STACK_OMNI, 80, 0, 0, 0, 0, 1, }, - { "databarexpandedstacked", BARCODE_RSS_EXPSTACK, 81, 0, 1, 0, 0, 1, }, + { "databarstacked", BARCODE_DBAR_STK, 79, 0, 0, 0, 0, 1 /*gs1_cvt*/, }, + { "databarstackedomni", BARCODE_DBAR_OMNSTK, 80, 0, 0, 0, 0, 1, }, + { "databarexpandedstacked", BARCODE_DBAR_EXPSTK, 81, 0, 1, 0, 0, 1, }, { "planet", BARCODE_PLANET, 82, 0, 0, 0, 0, 0, }, { "", -1, 83, 0, 0, 0, 0, 0, }, { "micropdf417", BARCODE_MICROPDF417, 84, 0, 1, 0, 0, 0, }, - { "onecode", BARCODE_ONECODE, 85, 0, 0, 0, 0, 0, }, + { "onecode", BARCODE_USPS_IMAIL, 85, 0, 0, 0, 0, 0, }, { "plessey", BARCODE_PLESSEY, 86, 0, 0, 0, 0, 0, }, { "telepennumeric", BARCODE_TELEPEN_NUM, 87, 0, 0, 0, 0, 0, }, { "", -1, 88, 0, 0, 0, 0, 0, }, @@ -1598,15 +1598,15 @@ static char *testUtilBwippName(int symbology, int option_1, int option_2, int op { "aztecrune", BARCODE_AZRUNE, 128, 0, 0, 0, 0, 0, }, { "code32", BARCODE_CODE32, 129, 0, 0, 0, 0, 0, }, { "ean13composite", BARCODE_EANX_CC, 130, 1, 0, 0, 72 /*linear_row_height*/, 1 /*gs1_cvt*/, }, - { "gs1-128composite", BARCODE_EAN128_CC, 131, 1, 0, 0, 36, 1, }, - { "databaromnicomposite", BARCODE_RSS14_CC, 132, 1, 0, 0, 33, 1, }, - { "databarlimitedcomposite", BARCODE_RSS_LTD_CC, 133, 1, 0, 0, 0, 1, }, - { "databarexpandedcomposite", BARCODE_RSS_EXP_CC, 134, 1, 1, 0, 0, 1, }, + { "gs1-128composite", BARCODE_GS1_128_CC, 131, 1, 0, 0, 36, 1, }, + { "databaromnicomposite", BARCODE_DBAR_OMN_CC, 132, 1, 0, 0, 33, 1, }, + { "databarlimitedcomposite", BARCODE_DBAR_LTD_CC, 133, 1, 0, 0, 0, 1, }, + { "databarexpandedcomposite", BARCODE_DBAR_EXP_CC, 134, 1, 1, 0, 0, 1, }, { "upcacomposite", BARCODE_UPCA_CC, 135, 1, 0, 0, 72, 1, }, { "upcecomposite", BARCODE_UPCE_CC, 136, 1, 0, 0, 72, 1, }, - { "databarstackedcomposite", BARCODE_RSS14STACK_CC, 137, 1, 0, 0, 0, 1, }, - { "databarstackedomnicomposite", BARCODE_RSS14_OMNI_CC, 138, 1, 0, 0, 0, 1, }, - { "databarexpandedstackedcomposite", BARCODE_RSS_EXPSTACK_CC, 139, 1, 1, 0, 0, 1, }, + { "databarstackedcomposite", BARCODE_DBAR_STK_CC, 137, 1, 0, 0, 0, 1, }, + { "databarstackedomnicomposite", BARCODE_DBAR_OMNSTK_CC, 138, 1, 0, 0, 0, 1, }, + { "databarexpandedstackedcomposite", BARCODE_DBAR_EXPSTK_CC, 139, 1, 1, 0, 0, 1, }, { "channelcode", BARCODE_CHANNEL, 140, 0, 0, 0, 0, 0, }, { "codeone", BARCODE_CODEONE, 141, 0, 0, 0, 0, 0, }, { "", BARCODE_GRIDMATRIX, 142, 0, 0, 0, 0, 0, }, @@ -1831,7 +1831,7 @@ int testUtilBwipp(const struct zint_symbol *symbol, int option_1, int option_2, } if (option_2 > 0) { - if (symbology == BARCODE_RSS_EXP || symbology == BARCODE_RSS_EXPSTACK) { + if (symbology == BARCODE_DBAR_EXP || symbology == BARCODE_DBAR_EXPSTK) { sprintf(bwipp_opts_buf + (int) strlen(bwipp_opts_buf), "%ssegments=%d", strlen(bwipp_opts_buf) ? " " : "", option_2 * 2); bwipp_opts = bwipp_opts_buf; } @@ -1910,7 +1910,7 @@ int testUtilBwipp(const struct zint_symbol *symbol, int option_1, int option_2, } /* Hack in various adjustments */ - if (symbology == BARCODE_RSS14 || symbology == BARCODE_RSS_LTD || symbology == BARCODE_RSS_EXP) { + if (symbology == BARCODE_DBAR_OMN || symbology == BARCODE_DBAR_LTD || symbology == BARCODE_DBAR_EXP) { /* Begin with space */ char adj[5] = " -sbs"; memmove(cmd + GS_INITIAL_LEN + sizeof(adj), cmd + GS_INITIAL_LEN, strlen(cmd) + 1 - GS_INITIAL_LEN); @@ -1936,7 +1936,7 @@ int testUtilBwipp(const struct zint_symbol *symbol, int option_1, int option_2, memmove(cmd + GS_INITIAL_LEN + sizeof(adj), cmd + GS_INITIAL_LEN, strlen(cmd) + 1 - GS_INITIAL_LEN); memcpy(cmd + GS_INITIAL_LEN, adj, sizeof(adj)); } - if (symbology == BARCODE_C25MATRIX) { + if (symbology == BARCODE_C25STANDARD) { /* Zint uses 4X start/stop wides while BWIPP uses 3X - convert */ char adj[91] = " -sp='i 0 eq i limit 4 sub eq or sbs i get 3 eq and { (1111) print true } { false } ifelse'"; memmove(cmd + GS_INITIAL_LEN + sizeof(adj), cmd + GS_INITIAL_LEN, strlen(cmd) + 1 - GS_INITIAL_LEN); diff --git a/backend/zint.h b/backend/zint.h index f261bbe3..18c04e74 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -141,7 +141,8 @@ extern "C" { /* Tbarcode 7 codes */ #define BARCODE_CODE11 1 -#define BARCODE_C25MATRIX 2 +#define BARCODE_C25STANDARD 2 +#define BARCODE_C25MATRIX 2 // Legacy #define BARCODE_C25INTER 3 #define BARCODE_C25IATA 4 #define BARCODE_C25LOGIC 6 @@ -150,7 +151,8 @@ extern "C" { #define BARCODE_EXCODE39 9 #define BARCODE_EANX 13 #define BARCODE_EANX_CHK 14 -#define BARCODE_EAN128 16 +#define BARCODE_GS1_128 16 +#define BARCODE_EAN128 16 // Legacy #define BARCODE_CODABAR 18 #define BARCODE_CODE128 20 #define BARCODE_DPLEIT 21 @@ -159,9 +161,12 @@ extern "C" { #define BARCODE_CODE49 24 #define BARCODE_CODE93 25 #define BARCODE_FLAT 28 -#define BARCODE_RSS14 29 -#define BARCODE_RSS_LTD 30 -#define BARCODE_RSS_EXP 31 +#define BARCODE_DBAR_OMN 29 +#define BARCODE_RSS14 29 // Legacy +#define BARCODE_DBAR_LTD 30 +#define BARCODE_RSS_LTD 30 // Legacy +#define BARCODE_DBAR_EXP 31 +#define BARCODE_RSS_EXP 31 // Legacy #define BARCODE_TELEPEN 32 #define BARCODE_UPCA 34 #define BARCODE_UPCA_CHK 35 @@ -192,12 +197,16 @@ extern "C" { #define BARCODE_NVE18 75 #define BARCODE_JAPANPOST 76 #define BARCODE_KOREAPOST 77 -#define BARCODE_RSS14STACK 79 -#define BARCODE_RSS14STACK_OMNI 80 -#define BARCODE_RSS_EXPSTACK 81 +#define BARCODE_DBAR_STK 79 +#define BARCODE_RSS14STACK 79 // Legacy +#define BARCODE_DBAR_OMNSTK 80 +#define BARCODE_RSS14STACK_OMNI 80 // Legacy +#define BARCODE_DBAR_EXPSTK 81 +#define BARCODE_RSS_EXPSTACK 81 // Legacy #define BARCODE_PLANET 82 #define BARCODE_MICROPDF417 84 -#define BARCODE_ONECODE 85 +#define BARCODE_USPS_IMAIL 85 +#define BARCODE_ONECODE 85 // Legacy #define BARCODE_PLESSEY 86 /* Tbarcode 8 codes */ @@ -229,15 +238,22 @@ extern "C" { #define BARCODE_AZRUNE 128 #define BARCODE_CODE32 129 #define BARCODE_EANX_CC 130 -#define BARCODE_EAN128_CC 131 -#define BARCODE_RSS14_CC 132 -#define BARCODE_RSS_LTD_CC 133 -#define BARCODE_RSS_EXP_CC 134 +#define BARCODE_GS1_128_CC 131 +#define BARCODE_EAN128_CC 131 // Legacy +#define BARCODE_DBAR_OMN_CC 132 +#define BARCODE_RSS14_CC 132 // Legacy +#define BARCODE_DBAR_LTD_CC 133 +#define BARCODE_RSS_LTD_CC 133 // Legacy +#define BARCODE_DBAR_EXP_CC 134 +#define BARCODE_RSS_EXP_CC 134 // Legacy #define BARCODE_UPCA_CC 135 #define BARCODE_UPCE_CC 136 -#define BARCODE_RSS14STACK_CC 137 -#define BARCODE_RSS14_OMNI_CC 138 -#define BARCODE_RSS_EXPSTACK_CC 139 +#define BARCODE_DBAR_STK_CC 137 +#define BARCODE_RSS14STACK_CC 137 // Legacy +#define BARCODE_DBAR_OMNSTK_CC 138 +#define BARCODE_RSS14_OMNI_CC 138 // Legacy +#define BARCODE_DBAR_EXPSTK_CC 139 +#define BARCODE_RSS_EXPSTACK_CC 139 // Legacy #define BARCODE_CHANNEL 140 #define BARCODE_CODEONE 141 #define BARCODE_GRIDMATRIX 142 diff --git a/backend_tcl/zint.c b/backend_tcl/zint.c index 70da5651..23e2cf45 100644 --- a/backend_tcl/zint.c +++ b/backend_tcl/zint.c @@ -258,7 +258,7 @@ static char *s_code_list[] = { static int s_code_number[] = { BARCODE_CODE11, - BARCODE_C25MATRIX, + BARCODE_C25STANDARD, BARCODE_C25INTER, BARCODE_C25IATA, BARCODE_C25LOGIC, @@ -267,7 +267,7 @@ static int s_code_number[] = { BARCODE_EXCODE39, BARCODE_EANX, BARCODE_EANX_CHK, - BARCODE_EAN128, + BARCODE_GS1_128, BARCODE_CODABAR, BARCODE_CODE128, BARCODE_DPLEIT, @@ -276,9 +276,9 @@ static int s_code_number[] = { BARCODE_CODE49, BARCODE_CODE93, BARCODE_FLAT, - BARCODE_RSS14, - BARCODE_RSS_LTD, - BARCODE_RSS_EXP, + BARCODE_DBAR_OMN, + BARCODE_DBAR_LTD, + BARCODE_DBAR_EXP, BARCODE_TELEPEN, BARCODE_UPCA, BARCODE_UPCA_CHK, @@ -309,12 +309,12 @@ static int s_code_number[] = { BARCODE_NVE18, BARCODE_JAPANPOST, BARCODE_KOREAPOST, - BARCODE_RSS14STACK, - BARCODE_RSS14STACK_OMNI, - BARCODE_RSS_EXPSTACK, + BARCODE_DBAR_STK, + BARCODE_DBAR_OMNSTK, + BARCODE_DBAR_EXPSTK, BARCODE_PLANET, BARCODE_MICROPDF417, - BARCODE_ONECODE, + BARCODE_USPS_IMAIL, BARCODE_PLESSEY, BARCODE_TELEPEN_NUM, BARCODE_ITF14, @@ -336,15 +336,15 @@ static int s_code_number[] = { BARCODE_AZRUNE, BARCODE_CODE32, BARCODE_EANX_CC, - BARCODE_EAN128_CC, - BARCODE_RSS14_CC, - BARCODE_RSS_LTD_CC, - BARCODE_RSS_EXP_CC, + BARCODE_GS1_128_CC, + BARCODE_DBAR_OMN_CC, + BARCODE_DBAR_LTD_CC, + BARCODE_DBAR_EXP_CC, BARCODE_UPCA_CC, BARCODE_UPCE_CC, - BARCODE_RSS14STACK_CC, - BARCODE_RSS14_OMNI_CC, - BARCODE_RSS_EXPSTACK_CC, + BARCODE_DBAR_STK_CC, + BARCODE_DBAR_OMNSTK_CC, + BARCODE_DBAR_EXPSTK_CC, BARCODE_CHANNEL, BARCODE_CODEONE, BARCODE_GRIDMATRIX, diff --git a/docs/manual.txt b/docs/manual.txt index 525e6d63..2db4457f 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -989,7 +989,7 @@ Numeric | Name | Barcode Name Value | -------------------------------------------------------------------------------- 1 | BARCODE_CODE11 | Code 11 -2 | BARCODE_C25MATRIX | Standard Code 2 of 5 +2* | BARCODE_C25STANDARD | Standard Code 2 of 5 3 | BARCODE_C25INTER | Interleaved 2 of 5 4 | BARCODE_C25IATA | Code 2 of 5 IATA 6 | BARCODE_C25LOGIC | Code 2 of 5 Data Logic @@ -998,7 +998,7 @@ Value | 9 | BARCODE_EXCODE39 | Extended Code 3 of 9 (Code 39+) 13 | BARCODE_EANX | EAN 14 | BARCODE_EANX_CHK | EAN + Check Digit -16 | BARCODE_EAN128 | GS1-128 (UCC.EAN-128) +16* | BARCODE_GS1_128 | GS1-128 (UCC.EAN-128) 18 | BARCODE_CODABAR | Codabar 20 | BARCODE_CODE128 | Code 128 (automatic subset switching) 21 | BARCODE_DPLEIT | Deutshe Post Leitcode @@ -1007,9 +1007,9 @@ Value | 24 | BARCODE_CODE49 | Code 49 25 | BARCODE_CODE93 | Code 93 28 | BARCODE_FLAT | Flattermarken -29 | BARCODE_RSS14 | GS1 DataBar Omnidirectional -30 | BARCODE_RSS_LTD | GS1 DataBar Limited -31 | BARCODE_RSS_EXP | GS1 DataBar Expanded +29* | BARCODE_DBAR_OMN | GS1 DataBar Omnidirectional +30* | BARCODE_DBAR_LTD | GS1 DataBar Limited +31* | BARCODE_DBAR_EXP | GS1 DataBar Expanded 32 | BARCODE_TELEPEN | Telepen Alpha 34 | BARCODE_UPCA | UPC-A 35 | BARCODE_UPCA_CHK | UPC-A + Check Digit @@ -1040,12 +1040,12 @@ Value | 75 | BARCODE_NVE18 | NVE-18 (SSCC-18) 76 | BARCODE_JAPANPOST | Japanese Postal Code 77 | BARCODE_KOREAPOST | Korea Post -79 | BARCODE_RSS14STACK | GS1 DataBar Stacked -80 | BARCODE_RSS14STACK_OMNI | GS1 DataBar Stacked Omnidirectional -81 | BARCODE_RSS_EXPSTACK | GS1 DataBar Expanded Stacked +79* | BARCODE_DBAR_STK | GS1 DataBar Stacked +80* | BARCODE_DBAR_OMNSTK | GS1 DataBar Stacked Omnidirectional +81* | BARCODE_DBAR_EXPSTK | GS1 DataBar Expanded Stacked 82 | BARCODE_PLANET | PLANET 84 | BARCODE_MICROPDF417 | MicroPDF417 -85 | BARCODE_ONECODE | USPS Intelligent Mail (OneCode) +85* | BARCODE_USPS_IMAIL | USPS Intelligent Mail (OneCode) 86 | BARCODE_PLESSEY | Plessey Code 87 | BARCODE_TELEPEN_NUM | Telepen Numeric 89 | BARCODE_ITF14 | ITF-14 @@ -1067,21 +1067,21 @@ Value | 128 | BARCODE_AZRUNE | Aztec Runes 129 | BARCODE_CODE32 | Code 32 130 | BARCODE_EANX_CC | Composite Symbol with EAN linear component -131 | BARCODE_EAN128_CC | Composite Symbol with GS1-128 linear +131* | BARCODE_GS1_128_CC | Composite Symbol with GS1-128 linear | | component -132 | BARCODE_RSS14_CC | Composite Symbol with GS1 DataBar +132* | BARCODE_DBAR_OMN_CC | Composite Symbol with GS1 DataBar | | Omnidirectional linear component -133 | BARCODE_RSS_LTD_CC | Composite Symbol with GS1 DataBar Limited +133* | BARCODE_DBAR_LTD_CC | Composite Symbol with GS1 DataBar Limited | | linear component -134 | BARCODE_RSS_EXP_CC | Composite Symbol with GS1 DataBar Expanded +134* | BARCODE_DBAR_EXP_CC | Composite Symbol with GS1 DataBar Expanded | | linear component 135 | BARCODE_UPCA_CC | Composite Symbol with UPC-A linear component 136 | BARCODE_UPCE_CC | Composite Symbol with UPC-E linear component -137 | BARCODE_RSS14STACK_CC | Composite Symbol with GS1 DataBar Stacked +137* | BARCODE_DBAR_STK_CC | Composite Symbol with GS1 DataBar Stacked | | component -138 | BARCODE_RSS14_OMNI_CC | Composite Symbol with GS1 DataBar Stacked +138* | BARCODE_DBAR_OMNSTK_CC | Composite Symbol with GS1 DataBar Stacked | | Omnidirectional component -139 | BARCODE_RSS_EXPSTACK_CC | Composite Symbol with GS1 DataBar Expanded +139* | BARCODE_DBAR_EXPSTK_CC | Composite Symbol with GS1 DataBar Expanded | | Stacked component 140 | BARCODE_CHANNEL | Channel Code 141 | BARCODE_CODEONE | Code One @@ -1091,6 +1091,11 @@ Value | 145 | BARCODE_RMQR | Rectangular Micro QR Code (rMQR) -------------------------------------------------------------------------------- +Note: Symbologies marked with an asterisk (*) in the above table used different +enumeration in Zint before version 2.9.0. For example, symbology 29 used the name +"BARCODE_RSS14". These names are now depreciated but are still recognised by +Zint and will continue to be supported in future versions. + 5.8 Adjusting other output options ---------------------------------- The output_options variable can be used to adjust various aspects of the output @@ -1686,21 +1691,21 @@ Numeric | Name | Barcode Name Value | -------------------------------------------------------------------------------- 130 | BARCODE_EANX_CC | Composite Symbol with EAN linear component -131 | BARCODE_EAN128_CC | Composite Symbol with GS1-128 linear +131 | BARCODE_GS1_128_CC | Composite Symbol with GS1-128 linear | | component -132 | BARCODE_RSS14_CC | Composite Symbol with GS1 DataBar +132 | BARCODE_DBAR_OMN_CC | Composite Symbol with GS1 DataBar | | Omnidirectional linear component -133 | BARCODE_RSS_LTD_CC | Composite Symbol with GS1 DataBar Limited +133 | BARCODE_DBAR_LTD_CC | Composite Symbol with GS1 DataBar Limited | | linear component -134 | BARCODE_RSS_EXP_CC | Composite Symbol with GS1 DataBar Expanded +134 | BARCODE_DBAR_EXP_CC | Composite Symbol with GS1 DataBar Expanded | | linear component 135 | BARCODE_UPCA_CC | Composite Symbol with UPC-A linear component 136 | BARCODE_UPCE_CC | Composite Symbol with UPC-E linear component -137 | BARCODE_RSS14STACK_CC | Composite Symbol with GS1 DataBar Stacked +137 | BARCODE_DBAR_STK_CC | Composite Symbol with GS1 DataBar Stacked | | component -138 | BARCODE_RSS14_OMNI_CC | Composite Symbol with GS1 DataBar Stacked +138 | BARCODE_DBAR_OMNSTK_CC | Composite Symbol with GS1 DataBar Stacked | | Omnidirectional component -139 | BARCODE_RSS_EXPSTACK_CC | Composite Symbol with GS1 DataBar Expanded +139 | BARCODE_DBAR_EXPSTK_CC | Composite Symbol with GS1 DataBar Expanded | | Stacked component -------------------------------------------------------------------------------- diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp index 35457038..78c5451e 100644 --- a/frontend_qt/mainwindow.cpp +++ b/frontend_qt/mainwindow.cpp @@ -713,7 +713,7 @@ void MainWindow::change_options() connect(m_optionWidget->findChild("radC49GS1"), SIGNAL(toggled( bool )), SLOT(update_preview())); } - if (symbology == BARCODE_RSS_EXPSTACK) + if (symbology == BARCODE_DBAR_EXPSTK) { QFile file(":/grpDBExtend.ui"); if (!file.open(QIODevice::ReadOnly)) @@ -786,12 +786,12 @@ void MainWindow::change_options() case BARCODE_EANX: case BARCODE_UPCA: case BARCODE_UPCE: - case BARCODE_RSS14: - case BARCODE_RSS_LTD: - case BARCODE_RSS_EXP: - case BARCODE_RSS14STACK: - case BARCODE_RSS14STACK_OMNI: - case BARCODE_RSS_EXPSTACK: + case BARCODE_DBAR_OMN: + case BARCODE_DBAR_LTD: + case BARCODE_DBAR_EXP: + case BARCODE_DBAR_STK: + case BARCODE_DBAR_OMNSTK: + case BARCODE_DBAR_EXPSTK: grpComposite->show(); break; default: @@ -916,9 +916,9 @@ void MainWindow::update_preview() if(m_optionWidget->findChild("radC128EAN")->isChecked()) { if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_EAN128_CC); + m_bc.bc.setSymbol(BARCODE_GS1_128_CC); else - m_bc.bc.setSymbol(BARCODE_EAN128); + m_bc.bc.setSymbol(BARCODE_GS1_128); } if(m_optionWidget->findChild("radC128HIBC")->isChecked()) @@ -954,46 +954,46 @@ void MainWindow::update_preview() upcean_addon_gap(m_optionWidget->findChild("cmbUPCEANAddonGap"), m_optionWidget->findChild("lblUPCEANAddonGap"), 7 /*base*/); break; - case BARCODE_RSS14: + case BARCODE_DBAR_OMN: if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_RSS14_CC); + m_bc.bc.setSymbol(BARCODE_DBAR_OMN_CC); else - m_bc.bc.setSymbol(BARCODE_RSS14); + m_bc.bc.setSymbol(BARCODE_DBAR_OMN); break; - case BARCODE_RSS_LTD: + case BARCODE_DBAR_LTD: if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_RSS_LTD_CC); + m_bc.bc.setSymbol(BARCODE_DBAR_LTD_CC); else - m_bc.bc.setSymbol(BARCODE_RSS_LTD); + m_bc.bc.setSymbol(BARCODE_DBAR_LTD); break; - case BARCODE_RSS_EXP: + case BARCODE_DBAR_EXP: if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_RSS_EXP_CC); + m_bc.bc.setSymbol(BARCODE_DBAR_EXP_CC); else - m_bc.bc.setSymbol(BARCODE_RSS_EXP); + m_bc.bc.setSymbol(BARCODE_DBAR_EXP); break; - case BARCODE_RSS14STACK: + case BARCODE_DBAR_STK: if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_RSS14STACK_CC); + m_bc.bc.setSymbol(BARCODE_DBAR_STK_CC); else - m_bc.bc.setSymbol(BARCODE_RSS14STACK); + m_bc.bc.setSymbol(BARCODE_DBAR_STK); break; - case BARCODE_RSS14STACK_OMNI: + case BARCODE_DBAR_OMNSTK: if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_RSS14_OMNI_CC); + m_bc.bc.setSymbol(BARCODE_DBAR_OMNSTK_CC); else - m_bc.bc.setSymbol(BARCODE_RSS14STACK_OMNI); + m_bc.bc.setSymbol(BARCODE_DBAR_OMNSTK); break; - case BARCODE_RSS_EXPSTACK: + case BARCODE_DBAR_EXPSTK: if(chkComposite->isChecked()) - m_bc.bc.setSymbol(BARCODE_RSS_EXPSTACK_CC); + m_bc.bc.setSymbol(BARCODE_DBAR_EXPSTK_CC); else - m_bc.bc.setSymbol(BARCODE_RSS_EXPSTACK); + m_bc.bc.setSymbol(BARCODE_DBAR_EXPSTK); if(m_optionWidget->findChild("cmbCols")->currentIndex() != 0) m_bc.bc.setOption2(m_optionWidget->findChild("cmbCols")->currentIndex());