mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-24 20:14:28 -04:00
EAN/UPC: add quiet zone indicators option (API output_options
`EANUPC_GUARD_WHITESPACE`, CLI `--guardwhitespace`) (ticket #287) EAN-2/EAN-5: HRT now at top instead of at bottom for standalones, following BWIPP CLI: batch mode: don't close input if stdin EAN/UPC: fix excess 1X to right of add-ons Composites: fix excess whitespace; fix quiet zone calcs to allow for linear shifting CLI: use own (Wine) version of `CommandLineToArgvW()` to avoid loading "shell32.dll" Move "font.h" -> "raster_font.h" EPS/SVG: use new `out_putsf()` func to output floats, avoiding trailing zeroes & locale dependency EPS: simplify "TR" formula SVG: change font from "Helvetica, sans serif" to "OCR-B, monospace"; use single "<path>" instead of multiple "<rect>"s to draw boxes (reduces file size) Add `EMBED_VECTOR_FONT` to `output_options` (CLI `--embedfont`) to enable embedding of font in vector output - currently only for SVG output of EAN/UPC GUI: use "OCR-B" font for EAN/UPC and "Arimo" for all others (was "Helvetica" for both); paint background of screen preview light grey so as contrasts with whitespace and quiet zones EMF: prefix funcs with `emf_`; simplify string `halign` handling large: rename `large_int` -> `large_uint` CODE128/common: move `c128_hrt_cpy_iso8859_1()` to `hrt_cpy_iso8859_1()` and add `ZINT_WARN_HRT_TRUNCATED` warning (for future use) Various symbologies: replace `printf()` with `fputs()` (symbol->debug) QRCODE: better assert(), removing a NOLINT (2 left) CLI: add some more barcode synonyms for DBAR common: various fiddlings CMake: don't include png.c unless ZINT_USE_PNG (avoids clang warning)
This commit is contained in:
parent
6d015d6a8f
commit
607e4ed33a
395 changed files with 11528 additions and 23016 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2019-2022 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2019-2023 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -53,31 +53,31 @@ static void test_eanx_leading_zeroes(const testCtx *const p_ctx) {
|
|||
/* 5*/ { BARCODE_EANX_CC, "123456", "[21]A12345678", 0, 8, 72 },
|
||||
/* 6*/ { BARCODE_EANX_CC, "1234567", "[21]A12345678", 0, 8, 72 },
|
||||
/* 7*/ { BARCODE_EANX_CC, "12345678", "[21]A12345678", 0, 7, 99 }, /* EAN-13 */
|
||||
/* 8*/ { BARCODE_EANX_CC, "1+12", "[21]A12345678", 0, 8, 99 }, /* EAN-8 + EAN-2 */
|
||||
/* 9*/ { BARCODE_EANX_CC, "12+12", "[21]A12345678", 0, 8, 99 },
|
||||
/*10*/ { BARCODE_EANX_CC, "123+12", "[21]A12345678", 0, 8, 99 },
|
||||
/*11*/ { BARCODE_EANX_CC, "1234+12", "[21]A12345678", 0, 8, 99 },
|
||||
/*12*/ { BARCODE_EANX_CC, "12345+12", "[21]A12345678", 0, 8, 99 },
|
||||
/*13*/ { BARCODE_EANX_CC, "123456+12", "[21]A12345678", 0, 8, 99 },
|
||||
/*14*/ { BARCODE_EANX_CC, "1234567+12", "[21]A12345678", 0, 8, 99 },
|
||||
/*15*/ { BARCODE_EANX_CC, "12345678+12", "[21]A12345678", 0, 7, 126 }, /* EAN-13 + EAN-2 */
|
||||
/*16*/ { BARCODE_EANX_CC, "1+123", "[21]A12345678", 0, 8, 126 }, /* EAN-8 + EAN-5 */
|
||||
/*17*/ { BARCODE_EANX_CC, "12+123", "[21]A12345678", 0, 8, 126 },
|
||||
/*18*/ { BARCODE_EANX_CC, "123+123", "[21]A12345678", 0, 8, 126 },
|
||||
/*19*/ { BARCODE_EANX_CC, "1234+123", "[21]A12345678", 0, 8, 126 },
|
||||
/*20*/ { BARCODE_EANX_CC, "12345+123", "[21]A12345678", 0, 8, 126 },
|
||||
/*21*/ { BARCODE_EANX_CC, "123456+123", "[21]A12345678", 0, 8, 126 },
|
||||
/*22*/ { BARCODE_EANX_CC, "1234567+123", "[21]A12345678", 0, 8, 126 },
|
||||
/*23*/ { BARCODE_EANX_CC, "12345678+123", "[21]A12345678", 0, 7, 153 }, /* EAN-13 + EAN-5 */
|
||||
/* 8*/ { BARCODE_EANX_CC, "1+12", "[21]A12345678", 0, 8, 98 }, /* EAN-8 + EAN-2 */
|
||||
/* 9*/ { BARCODE_EANX_CC, "12+12", "[21]A12345678", 0, 8, 98 },
|
||||
/*10*/ { BARCODE_EANX_CC, "123+12", "[21]A12345678", 0, 8, 98 },
|
||||
/*11*/ { BARCODE_EANX_CC, "1234+12", "[21]A12345678", 0, 8, 98 },
|
||||
/*12*/ { BARCODE_EANX_CC, "12345+12", "[21]A12345678", 0, 8, 98 },
|
||||
/*13*/ { BARCODE_EANX_CC, "123456+12", "[21]A12345678", 0, 8, 98 },
|
||||
/*14*/ { BARCODE_EANX_CC, "1234567+12", "[21]A12345678", 0, 8, 98 },
|
||||
/*15*/ { BARCODE_EANX_CC, "12345678+12", "[21]A12345678", 0, 7, 125 }, /* EAN-13 + EAN-2 */
|
||||
/*16*/ { BARCODE_EANX_CC, "1+123", "[21]A12345678", 0, 8, 125 }, /* EAN-8 + EAN-5 */
|
||||
/*17*/ { BARCODE_EANX_CC, "12+123", "[21]A12345678", 0, 8, 125 },
|
||||
/*18*/ { BARCODE_EANX_CC, "123+123", "[21]A12345678", 0, 8, 125 },
|
||||
/*19*/ { BARCODE_EANX_CC, "1234+123", "[21]A12345678", 0, 8, 125 },
|
||||
/*20*/ { BARCODE_EANX_CC, "12345+123", "[21]A12345678", 0, 8, 125 },
|
||||
/*21*/ { BARCODE_EANX_CC, "123456+123", "[21]A12345678", 0, 8, 125 },
|
||||
/*22*/ { BARCODE_EANX_CC, "1234567+123", "[21]A12345678", 0, 8, 125 },
|
||||
/*23*/ { BARCODE_EANX_CC, "12345678+123", "[21]A12345678", 0, 7, 152 }, /* EAN-13 + EAN-5 */
|
||||
/*24*/ { BARCODE_EANX_CC, "1234567890128", "[21]A12345678", 0, 7, 99 }, /* EAN-13 + CHK */
|
||||
/*25*/ { BARCODE_EANX_CC, "1234567890128+12", "[21]A12345678", 0, 7, 126 }, /* EAN-13 + CHK + EAN-2 */
|
||||
/*26*/ { BARCODE_EANX_CC, "1234567890128+12345", "[21]A12345678", 0, 7, 153 }, /* EAN-13 + CHK + EAN-5 */
|
||||
/*25*/ { BARCODE_EANX_CC, "1234567890128+12", "[21]A12345678", 0, 7, 125 }, /* EAN-13 + CHK + EAN-2 */
|
||||
/*26*/ { BARCODE_EANX_CC, "1234567890128+12345", "[21]A12345678", 0, 7, 152 }, /* EAN-13 + CHK + EAN-5 */
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
testStart("test_eanx_leading_zeroes");
|
||||
testStartSymbol("test_eanx_leading_zeroes", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -1424,106 +1424,106 @@ static void test_examples(const testCtx *const p_ctx) {
|
|||
"00000000010110001100001010001001000010010100110001101110100111000111010010011110101100100001001010011000110111010011100011101001001111010110010000100101001100011011101001110001110100100111101011010000100010010000100100111000101000000000000"
|
||||
"00000001101001110011110101110110111101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011010110011100100010110001110001011011000010100101111011101101111011011000111010110000000000"
|
||||
},
|
||||
/* 70*/ { BARCODE_EANX_CC, -1, 1, "123456789012+12", "[91]123456789012345678901", 0, 8, 126, 1, "Example of EAN-13 with 2-digit addon, CC-A 4 cols, 4 rows",
|
||||
"110100100011110011010011100101110111000100001001000110101110111001000001100000100110111011101100101000000000000000000000000000"
|
||||
"110101100011101011001000000110011110101111101001000010110010111101100001100100111000001011001100101000000000000000000000000000"
|
||||
"110101110011101011111010000111111001101110101011000010111110101111001101001101001110000011011100101000000000000000000000000000"
|
||||
"110101111010001100110000100100001011100011101011100010100011100111000101101000100011000011011110101000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101100110010100100110"
|
||||
/* 70*/ { BARCODE_EANX_CC, -1, 1, "123456789012+12", "[91]123456789012345678901", 0, 8, 125, 1, "Example of EAN-13 with 2-digit addon, CC-A 4 cols, 4 rows",
|
||||
"11010010001111001101001110010111011100010000100100011010111011100100000110000010011011101110110010100000000000000000000000000"
|
||||
"11010110001110101100100000011001111010111110100100001011001011110110000110010011100000101100110010100000000000000000000000000"
|
||||
"11010111001110101111101000011111100110111010101100001011111010111100110100110100111000001101110010100000000000000000000000000"
|
||||
"11010111101000110011000010010000101110001110101110001010001110011100010110100010001100001101111010100000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00010100100110111101001110101100010000101001000101010100100011101001110010110011011011001001000101000000010110011001010010011"
|
||||
},
|
||||
/* 71*/ { BARCODE_EANX_CC, -1, 1, "123456789012+54321", "[91]1234567890", 0, 7, 153, 1, "Example of EAN-13 with 5-digit addon, CC-B 4 cols, 3 rows",
|
||||
"110110111011110011010011100101110111000100001001110100101110111001000001100000100110111011011000101000000000000000000000000000000000000000000000000000000"
|
||||
"110110110011111101010011100111110001001001101001100100110100011100010001001011111100111011001000101000000000000000000000000000000000000000000000000000000"
|
||||
"110110100010100000101111000111001111001011101001100110110011111010010001001111101101000011101000101000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101101110010101000110101000010100100110100110010"
|
||||
/* 71*/ { BARCODE_EANX_CC, -1, 1, "123456789012+54321", "[91]1234567890", 0, 7, 152, 1, "Example of EAN-13 with 5-digit addon, CC-B 4 cols, 3 rows",
|
||||
"11011011101111001101001110010111011100010000100111010010111011100100000110000010011011101101100010100000000000000000000000000000000000000000000000000000"
|
||||
"11011011001111110101001110011111000100100110100110010011010001110001000100101111110011101100100010100000000000000000000000000000000000000000000000000000"
|
||||
"11011010001010000010111100011100111100101110100110011011001111101001000100111110110100001110100010100000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"00010100100110111101001110101100010000101001000101010100100011101001110010110011011011001001000101000000010110111001010100011010100001010010011010011001"
|
||||
},
|
||||
/* 72*/ { BARCODE_UPCA_CC, -1, 1, "12345678901+12", "[91]123456789", 0, 7, 128, 1, "Example of UPC-A with 2-digit addon, CC-A 4 cols, 3 rows",
|
||||
"11011011101111001101001110010111011100010000100111010010111011100100000110000010011011101101100010100000000000000000000000000000"
|
||||
"11011011001110011100111101011000010001110010100110010011101011001000000100101111110011101100100010100000000000000000000000000000"
|
||||
"11011010001000011110010001010111101000000100100110011010001110000101100110111000100011101110100010100000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000"
|
||||
"00010100110010010011011110101000110110001010111101010100010010010001110100111001011001101101100101000000000101100110010100100110"
|
||||
/* 72*/ { BARCODE_UPCA_CC, -1, 1, "12345678901+12", "[91]123456789", 0, 7, 127, 1, "Example of UPC-A with 2-digit addon, CC-A 4 cols, 3 rows",
|
||||
"1101101110111100110100111001011101110001000010011101001011101110010000011000001001101110110110001010000000000000000000000000000"
|
||||
"1101101100111001110011110101100001000111001010011001001110101100100000010010111111001110110010001010000000000000000000000000000"
|
||||
"1101101000100001111001000101011110100000010010011001101000111000010110011011100010001110111010001010000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000"
|
||||
"0001010011001001001101111010100011011000101011110101010001001001000111010011100101100110110110010100000000010110011001010010011"
|
||||
},
|
||||
/* 73*/ { BARCODE_UPCA_CC, -1, 2, "12345678901+12121", "[91]1234567890123", 0, 8, 155, 1, "Example of UPC-A with 5-digit addon, CC-B 4 cols, 4 rows",
|
||||
"11010011101000111110100111011011111101011100100111011011010000111101100110010111000010001101001000100000000000000000000000000000000000000000000000000000000"
|
||||
"11010011001011001001110000010111110110000010100111010011011111100110100111010011111001001101011000100000000000000000000000000000000000000000000000000000000"
|
||||
"11010001001110011010000110011001000001011000100110010010011110111101000111000111010001001101011100100000000000000000000000000000000000000000000000000000000"
|
||||
"11010001101100010111000001011101101110010000100110011011111000101011000111100010010100001101011110100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00010100110010010011011110101000110110001010111101010100010010010001110100111001011001101101100101000000000101100110010100100110101100110100110110100110010"
|
||||
/* 73*/ { BARCODE_UPCA_CC, -1, 2, "12345678901+12121", "[91]1234567890123", 0, 8, 154, 1, "Example of UPC-A with 5-digit addon, CC-B 4 cols, 4 rows",
|
||||
"1101001110100011111010011101101111110101110010011101101101000011110110011001011100001000110100100010000000000000000000000000000000000000000000000000000000"
|
||||
"1101001100101100100111000001011111011000001010011101001101111110011010011101001111100100110101100010000000000000000000000000000000000000000000000000000000"
|
||||
"1101000100111001101000011001100100000101100010011001001001111011110100011100011101000100110101110010000000000000000000000000000000000000000000000000000000"
|
||||
"1101000110110001011100000101110110111001000010011001101111100010101100011110001001010000110101111010000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"0001010011001001001101111010100011011000101011110101010001001001000111010011100101100110110110010100000000010110011001010010011010110011010011011010011001"
|
||||
},
|
||||
/* 74*/ { BARCODE_UPCE_CC, -1, 1, "0654321+89", "[91]1", 0, 9, 82, 1, "Example of UPC-E with 2-digit addon, CC-A 2 cols, 5 rows",
|
||||
"1101100110111101110101111101010001000111100011110101001000000000000000000000000000"
|
||||
"1101101110111011000010001101110010101110000011100101001000000000000000000000000000"
|
||||
"1101101100110001011111011101111010000100100011101101001000000000000000000000000000"
|
||||
"1101101000100111011100111101110011110101110011101001001000000000000000000000000000"
|
||||
"1101001000110011001000000101110100011011110011101001101000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0001010000101011000100111010111101001101100110010101010000000101101101110100101110"
|
||||
/* 74*/ { BARCODE_UPCE_CC, -1, 1, "0654321+89", "[91]1", 0, 9, 81, 1, "Example of UPC-E with 2-digit addon, CC-A 2 cols, 5 rows",
|
||||
"110110011011110111010111110101000100011110001111010100100000000000000000000000000"
|
||||
"110110111011101100001000110111001010111000001110010100100000000000000000000000000"
|
||||
"110110110011000101111101110111101000010010001110110100100000000000000000000000000"
|
||||
"110110100010011101110011110111001111010111001110100100100000000000000000000000000"
|
||||
"110100100011001100100000010111010001101111001110100110100000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000100000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000101000010101100010011101011110100110110011001010101000000010110110111010010111"
|
||||
},
|
||||
/* 75*/ { BARCODE_UPCE_CC, -1, 2, "1876543+56789", "[91]12345", 0, 12, 109, 1, "Example of UPC-E with 5-digit addon, CC-B 2 cols, 8 rows",
|
||||
"1100100010111011111011101001000001000010001011001000101000000000000000000000000000000000000000000000000000000"
|
||||
"1110100010110100001111011001100101110000100011101000101000000000000000000000000000000000000000000000000000000"
|
||||
"1110110010111011001001111101000111100100001011101100101000000000000000000000000000000000000000000000000000000"
|
||||
"1100110010110011101100010001010111110111110011001100101000000000000000000000000000000000000000000000000000000"
|
||||
"1101110010111110010011011101001111110100110011011100101000000000000000000000000000000000000000000000000000000"
|
||||
"1101111010110011100001011101001101000011100011011110101000000000000000000000000000000000000000000000000000000"
|
||||
"1100111010101000100000100001011110111110110011001110101000000000000000000000000000000000000000000000000000000"
|
||||
"1110111010101111001011110001011110001001111011101110101000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0001010110111001000100001010110001010001101000010101010000000101101100010101011110100100010101101110100101110"
|
||||
/* 75*/ { BARCODE_UPCE_CC, -1, 2, "1876543+56789", "[91]12345", 0, 12, 108, 1, "Example of UPC-E with 5-digit addon, CC-B 2 cols, 8 rows",
|
||||
"110010001011101111101110100100000100001000101100100010100000000000000000000000000000000000000000000000000000"
|
||||
"111010001011010000111101100110010111000010001110100010100000000000000000000000000000000000000000000000000000"
|
||||
"111011001011101100100111110100011110010000101110110010100000000000000000000000000000000000000000000000000000"
|
||||
"110011001011001110110001000101011111011111001100110010100000000000000000000000000000000000000000000000000000"
|
||||
"110111001011111001001101110100111111010011001101110010100000000000000000000000000000000000000000000000000000"
|
||||
"110111101011001110000101110100110100001110001101111010100000000000000000000000000000000000000000000000000000"
|
||||
"110011101010100010000010000101111011111011001100111010100000000000000000000000000000000000000000000000000000"
|
||||
"111011101010111100101111000101111000100111101110111010100000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"000101011011100100010000101011000101000110100001010101000000010110110001010101111010010001010110111010010111"
|
||||
},
|
||||
/* 76*/ { BARCODE_EANX_CC, -1, 1, "9876543+65", "[91]1234567", 0, 8, 99, 1, "Example of EAN-8 with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
"100100011111001101010011000111000101110011001100010111010000011101001101000000000000000000000000000"
|
||||
"110111111001101001010111000110111100101100001111000100111101011101011101000000000000000000000000000"
|
||||
"100001011000001101010110000101011111011111001110100100001110011101011001000000000000000000000000000"
|
||||
"111100100011001101010010000110010011111011101010011111000110011101010001000000000000000000000000000"
|
||||
"000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000010100010110110111011101101011110101010011101011100100001011100101010000000101101011110101110010"
|
||||
/* 76*/ { BARCODE_EANX_CC, -1, 1, "9876543+65", "[91]1234567", 0, 8, 98, 1, "Example of EAN-8 with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
"10010001111100110101001100011100010111001100110001011101000001110100110100000000000000000000000000"
|
||||
"11011111100110100101011100011011110010110000111100010011110101110101110100000000000000000000000000"
|
||||
"10000101100000110101011000010101111101111100111010010000111001110101100100000000000000000000000000"
|
||||
"11110010001100110101001000011001001111101110101001111100011001110101000100000000000000000000000000"
|
||||
"00001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000"
|
||||
"00001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00001010001011011011101110110101111010101001110101110010000101110010101000000010110101111010111001"
|
||||
},
|
||||
/* 77*/ { BARCODE_EANX_CC, -1, 2, "9876543+74083", "[91]123456789012345678", 0, 12, 136, 1, "Example of EAN-8 with 5-digit addon, CC-B 3 cols, 8 rows",
|
||||
"1100111010111011111011101001000010110100000100001000101111101101001111011001110101000000000000000000000000000000000000000000000000000000"
|
||||
"1110111010110010111000010001000010010111001011001000001110001101110100011101110101000000000000000000000000000000000000000000000000000000"
|
||||
"1110011010110111111001101001000011010101000101111000001100100110111111011100110101000000000000000000000000000000000000000000000000000000"
|
||||
"1111011010111011010000110001000111010110000110110011001110011010011000011110110101000000000000000000000000000000000000000000000000000000"
|
||||
"1111001010111011011100100001000110010111011101111001001010011110000100011110010101000000000000000000000000000000000000000000000000000000"
|
||||
"1110001010111111010110001001000100010111001011111101101001111000011011011100010101000000000000000000000000000000000000000000000000000000"
|
||||
"1100001010111100100010111101001100010111001111001100101001110001110010011000010101000000000000000000000000000000000000000000000000000000"
|
||||
"1100011010110011001111010001001110010111110111101110101011100111111001011000110101000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000010100010110110111011101101011110101010011101011100100001011100101010000000101101110110100111010100011010101101110101000010"
|
||||
/* 77*/ { BARCODE_EANX_CC, -1, 2, "9876543+74083", "[91]123456789012345678", 0, 12, 135, 1, "Example of EAN-8 with 5-digit addon, CC-B 3 cols, 8 rows",
|
||||
"110011101011101111101110100100001011010000010000100010111110110100111101100111010100000000000000000000000000000000000000000000000000000"
|
||||
"111011101011001011100001000100001001011100101100100000111000110111010001110111010100000000000000000000000000000000000000000000000000000"
|
||||
"111001101011011111100110100100001101010100010111100000110010011011111101110011010100000000000000000000000000000000000000000000000000000"
|
||||
"111101101011101101000011000100011101011000011011001100111001101001100001111011010100000000000000000000000000000000000000000000000000000"
|
||||
"111100101011101101110010000100011001011101110111100100101001111000010001111001010100000000000000000000000000000000000000000000000000000"
|
||||
"111000101011111101011000100100010001011100101111110110100111100001101101110001010100000000000000000000000000000000000000000000000000000"
|
||||
"110000101011110010001011110100110001011100111100110010100111000111001001100001010100000000000000000000000000000000000000000000000000000"
|
||||
"110001101011001100111101000100111001011111011110111010101110011111100101100011010100000000000000000000000000000000000000000000000000000"
|
||||
"000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000010000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000"
|
||||
"000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000001010001011011011101110110101111010101001110101110010000101110010101000000010110111011010011101010001101010110111010100001"
|
||||
},
|
||||
/* 78*/ { BARCODE_EANX_CC, -1, 1, "1234567890128+65", "[91]1234567", 0, 7, 126, 1, "Example of EAN-13 + CHK with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
"110110111011110011010011100101110111000100001001110100101110111001000001100001100101000011011000101000000000000000000000000000"
|
||||
"110110110010011001011111100111110110010000101001100100111111011100101001101011100010000011001000101000000000000000000000000000"
|
||||
"110110100011010111111001000110111010000111001001100110100010010011110001010000110111110011101000101000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101101011110101110010"
|
||||
/* 78*/ { BARCODE_EANX_CC, -1, 1, "1234567890128+65", "[91]1234567", 0, 7, 125, 1, "Example of EAN-13 + CHK with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
"11011011101111001101001110010111011100010000100111010010111011100100000110000110010100001101100010100000000000000000000000000"
|
||||
"11011011001001100101111110011111011001000010100110010011111101110010100110101110001000001100100010100000000000000000000000000"
|
||||
"11011010001101011111100100011011101000011100100110011010001001001111000101000011011111001110100010100000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00010100100110111101001110101100010000101001000101010100100011101001110010110011011011001001000101000000010110101111010111001"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char escaped[1024];
|
||||
char esc_composite[4096];
|
||||
|
@ -1533,7 +1533,7 @@ static void test_examples(const testCtx *const p_ctx) {
|
|||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_examples");
|
||||
testStartSymbol("test_examples", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -1699,14 +1699,14 @@ static void test_odd_numbered_numeric(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char bwipp_buf[8192];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_odd_numbered_numeric");
|
||||
testStartSymbol("test_odd_numbered_numeric", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -1828,14 +1828,14 @@ static void test_ean128_cc_shift(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char bwipp_buf[8192];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_ean128_cc_shift");
|
||||
testStartSymbol("test_ean128_cc_shift", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -1914,9 +1914,9 @@ static void test_ean128_cc_width(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
testStart("test_ean128_cc_width");
|
||||
testStartSymbol("test_ean128_cc_width", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -2376,14 +2376,14 @@ static void test_encodation_0(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char bwipp_buf[8192];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_encodation_0");
|
||||
testStartSymbol("test_encodation_0", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -2514,14 +2514,14 @@ static void test_encodation_10(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char bwipp_buf[8192];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_encodation_10");
|
||||
testStartSymbol("test_encodation_10", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -2930,14 +2930,14 @@ static void test_encodation_11(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char bwipp_buf[8192];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_encodation_11");
|
||||
testStartSymbol("test_encodation_11", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -3000,7 +3000,17 @@ static void test_addongap(const testCtx *const p_ctx) {
|
|||
};
|
||||
/* Verified via bwipp_dump.ps against BWIPP */
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_EANX_CC, 1, -1, "1234567+12", 0, 8, 99, "EAN-8 default 7 gap",
|
||||
/* 0*/ { BARCODE_EANX_CC, 1, -1, "1234567+12", 0, 8, 98, "EAN-8 default 7 gap",
|
||||
"10010001111100110101001100011110001011001100110110011110000101110100110100000000000000000000000000"
|
||||
"10000011100101100101011100010111100010001000100000100101111001110101110100000000000000000000000000"
|
||||
"11001101001000000101011000011010011100011110110001100110011001110101100100000000000000000000000000"
|
||||
"11111000101001100101001000011100001011100110111000110111010001110101000100000000000000000000000000"
|
||||
"00001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000"
|
||||
"00001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"00001010011001001001101111010100011010101001110101000010001001110010101000000010110011001010010011"
|
||||
},
|
||||
/* 1*/ { BARCODE_EANX_CC, 1, 8, "1234567+12", 0, 8, 99, "EAN-8 8 gap",
|
||||
"100100011111001101010011000111100010110011001101100111100001011101001101000000000000000000000000000"
|
||||
"100000111001011001010111000101111000100010001000001001011110011101011101000000000000000000000000000"
|
||||
"110011010010000001010110000110100111000111101100011001100110011101011001000000000000000000000000000"
|
||||
|
@ -3008,80 +3018,70 @@ static void test_addongap(const testCtx *const p_ctx) {
|
|||
"000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000010100110010010011011110101000110101010011101010000100010011100101010000000101100110010100100110"
|
||||
"000010100110010010011011110101000110101010011101010000100010011100101010000000010110011001010010011"
|
||||
},
|
||||
/* 1*/ { BARCODE_EANX_CC, 1, 8, "1234567+12", 0, 8, 100, "EAN-8 8 gap",
|
||||
"1001000111110011010100110001111000101100110011011001111000010111010011010000000000000000000000000000"
|
||||
"1000001110010110010101110001011110001000100010000010010111100111010111010000000000000000000000000000"
|
||||
"1100110100100000010101100001101001110001111011000110011001100111010110010000000000000000000000000000"
|
||||
"1111100010100110010100100001110000101110011011100011011101000111010100010000000000000000000000000000"
|
||||
"0000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000"
|
||||
"0000101001100100100110111101010001101010100111010100001000100111001010100000000101100110010100100110"
|
||||
/* 2*/ { BARCODE_EANX_CC, 1, -1, "123456789012+12345", 0, 7, 152, "EAN-13 default 7 gap",
|
||||
"11011011101111001101001110011100010001001110100111010010001011000001100111100111101000101101100010100000000000000000000000000000000000000000000000000000"
|
||||
"11011011001100010001110010011100110001110010100110010010010001111101100111101001010000001100100010100000000000000000000000000000000000000000000000000000"
|
||||
"11011010001110111110101100010000101011110000100110011010000110001001110101111101100000101110100010100000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"00010100100110111101001110101100010000101001000101010100100011101001110010110011011011001001000101000000010110110011010010011010100001010100011010110001"
|
||||
},
|
||||
/* 2*/ { BARCODE_EANX_CC, 1, -1, "123456789012+12345", 0, 7, 153, "EAN-13 default 7 gap",
|
||||
"110110111011110011010011100111000100010011101001110100100010110000011001111001111010001011011000101000000000000000000000000000000000000000000000000000000"
|
||||
"110110110011000100011100100111001100011100101001100100100100011111011001111010010100000011001000101000000000000000000000000000000000000000000000000000000"
|
||||
"110110100011101111101011000100001010111100001001100110100001100010011101011111011000001011101000101000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101101100110100100110101000010101000110101100010"
|
||||
/* 3*/ { BARCODE_EANX_CC, 1, 9, "123456789012+12345", 0, 7, 154, "EAN-13 9 gap",
|
||||
"1101101110111100110100111001110001000100111010011101001000101100000110011110011110100010110110001010000000000000000000000000000000000000000000000000000000"
|
||||
"1101101100110001000111001001110011000111001010011001001001000111110110011110100101000000110010001010000000000000000000000000000000000000000000000000000000"
|
||||
"1101101000111011111010110001000010101111000010011001101000011000100111010111110110000010111010001010000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"0001010010011011110100111010110001000010100100010101010010001110100111001011001101101100100100010100000000010110110011010010011010100001010100011010110001"
|
||||
},
|
||||
/* 3*/ { BARCODE_EANX_CC, 1, 9, "123456789012+12345", 0, 7, 155, "EAN-13 9 gap",
|
||||
/* 4*/ { BARCODE_UPCA_CC, 1, -1, "12345678901+12345", 0, 7, 154, "UPC-A default 9 gap",
|
||||
"1101101110111100110100111001110001000100111010011101001000101100000110011110011110100010110110001010000000000000000000000000000000000000000000000000000000"
|
||||
"1101101100110001000111001001110011000111001010011001001001000111110110011110100101000000110010001010000000000000000000000000000000000000000000000000000000"
|
||||
"1101101000111011111010110001000010101111000010011001101000011000100111010111110110000010111010001010000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"0001010011001001001101111010100011011000101011110101010001001001000111010011100101100110110110010100000000010110110011010010011010100001010100011010110001"
|
||||
},
|
||||
/* 5*/ { BARCODE_UPCA_CC, 1, 10, "12345678901+12345", 0, 7, 155, "UPC-A 10 gap",
|
||||
"11011011101111001101001110011100010001001110100111010010001011000001100111100111101000101101100010100000000000000000000000000000000000000000000000000000000"
|
||||
"11011011001100010001110010011100110001110010100110010010010001111101100111101001010000001100100010100000000000000000000000000000000000000000000000000000000"
|
||||
"11011010001110111110101100010000101011110000100110011010000110001001110101111101100000101110100010100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00010100100110111101001110101100010000101001000101010100100011101001110010110011011011001001000101000000000101101100110100100110101000010101000110101100010"
|
||||
"00010100110010010011011110101000110110001010111101010100010010010001110100111001011001101101100101000000000010110110011010010011010100001010100011010110001"
|
||||
},
|
||||
/* 4*/ { BARCODE_UPCA_CC, 1, -1, "12345678901+12345", 0, 7, 155, "UPC-A default 9 gap",
|
||||
"11011011101111001101001110011100010001001110100111010010001011000001100111100111101000101101100010100000000000000000000000000000000000000000000000000000000"
|
||||
"11011011001100010001110010011100110001110010100110010010010001111101100111101001010000001100100010100000000000000000000000000000000000000000000000000000000"
|
||||
"11011010001110111110101100010000101011110000100110011010000110001001110101111101100000101110100010100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00010100110010010011011110101000110110001010111101010100010010010001110100111001011001101101100101000000000101101100110100100110101000010101000110101100010"
|
||||
/* 6*/ { BARCODE_UPCE_CC, 1, -1, "1234567+12", 0, 9, 81, "UPC-E default 7 gap",
|
||||
"110110011011101110101111000110111111011001001111010100100000000000000000000000000"
|
||||
"110110111010111001111001100100110011000010001110010100100000000000000000000000000"
|
||||
"110110110010010111101000000110100000111010001110110100100000000000000000000000000"
|
||||
"110110100011001001000111110101100001100111101110100100100000000000000000000000000"
|
||||
"110100100011001000001001100110100100011000001110100110100000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000100000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000101001001101111010100011011100100001010010001010101000000010110011001010010011"
|
||||
},
|
||||
/* 5*/ { BARCODE_UPCA_CC, 1, 10, "12345678901+12345", 0, 7, 156, "UPC-A 10 gap",
|
||||
"110110111011110011010011100111000100010011101001110100100010110000011001111001111010001011011000101000000000000000000000000000000000000000000000000000000000"
|
||||
"110110110011000100011100100111001100011100101001100100100100011111011001111010010100000011001000101000000000000000000000000000000000000000000000000000000000"
|
||||
"110110100011101111101011000100001010111100001001100110100001100010011101011111011000001011101000101000000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000"
|
||||
"000101001100100100110111101010001101100010101111010101000100100100011101001110010110011011011001010000000000101101100110100100110101000010101000110101100010"
|
||||
},
|
||||
/* 6*/ { BARCODE_UPCE_CC, 1, -1, "1234567+12", 0, 9, 82, "UPC-E default 7 gap",
|
||||
"1101100110111011101011110001101111110110010011110101001000000000000000000000000000"
|
||||
"1101101110101110011110011001001100110000100011100101001000000000000000000000000000"
|
||||
"1101101100100101111010000001101000001110100011101101001000000000000000000000000000"
|
||||
"1101101000110010010001111101011000011001111011101001001000000000000000000000000000"
|
||||
"1101001000110010000010011001101001000110000011101001101000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0010000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0001010010011011110101000110111001000010100100010101010000000101100110010100100110"
|
||||
},
|
||||
/* 7*/ { BARCODE_UPCE_CC, 1, 12, "1234567+12", 0, 9, 87, "UPC-E 12 gap",
|
||||
"110110011011101110101111000110111111011001001111010100100000000000000000000000000000000"
|
||||
"110110111010111001111001100100110011000010001110010100100000000000000000000000000000000"
|
||||
"110110110010010111101000000110100000111010001110110100100000000000000000000000000000000"
|
||||
"110110100011001001000111110101100001100111101110100100100000000000000000000000000000000"
|
||||
"110100100011001000001001100110100100011000001110100110100000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000000000"
|
||||
"001000000000000000000000000000000000000000000000000000100000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000001000000000000000000000000000000000"
|
||||
"000101001001101111010100011011100100001010010001010101000000000000101100110010100100110"
|
||||
/* 7*/ { BARCODE_UPCE_CC, 1, 12, "1234567+12", 0, 9, 86, "UPC-E 12 gap",
|
||||
"11011001101110111010111100011011111101100100111101010010000000000000000000000000000000"
|
||||
"11011011101011100111100110010011001100001000111001010010000000000000000000000000000000"
|
||||
"11011011001001011110100000011010000011101000111011010010000000000000000000000000000000"
|
||||
"11011010001100100100011111010110000110011110111010010010000000000000000000000000000000"
|
||||
"11010010001100100000100110011010010001100000111010011010000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000100000000000000000000000000000000"
|
||||
"00100000000000000000000000000000000000000000000000000010000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000100000000000000000000000000000000"
|
||||
"00010100100110111101010001101110010000101001000101010100000000000010110011001010010011"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
char bwipp_buf[8192];
|
||||
char bwipp_msg[1024];
|
||||
|
@ -3090,7 +3090,7 @@ static void test_addongap(const testCtx *const p_ctx) {
|
|||
|
||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||
|
||||
testStart("test_addongap");
|
||||
testStartSymbol("test_addongap", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -3179,9 +3179,9 @@ static void test_gs1parens(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
testStart("test_gs1parens");
|
||||
testStartSymbol("test_gs1parens", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -3262,9 +3262,9 @@ static void test_hrt(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
testStart("test_hrt");
|
||||
testStartSymbol("test_hrt", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -3424,9 +3424,9 @@ static void test_input(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
testStart("test_input");
|
||||
testStartSymbol("test_input", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
@ -3478,9 +3478,9 @@ static void test_fuzz(const testCtx *const p_ctx) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
struct zint_symbol *symbol = NULL;
|
||||
|
||||
testStart("test_fuzz");
|
||||
testStartSymbol("test_fuzz", &symbol);
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue