mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-28 05:54:19 -04:00
RAW_TEXT: expand UPC-A, UPC-E to EAN-13, and EAN-8 if has add-on,
and place any add-on data directly after (no separator) EAN-8 + add-on: warn as non-compliant (see ZXing-C++ issue #883, https://github.com/zxing-cpp/zxing-cpp/issues/883) test suite: BWIPP: use new EAN-8 + add-on option "permitaddon"; fix dumps of RAW_TEXT `memcmp()`s fails; various re-formatting bwipp_dump.ps: update to latest BWIPP
This commit is contained in:
parent
182c84fa4d
commit
26805338f8
36 changed files with 1273 additions and 908 deletions
|
@ -2915,6 +2915,10 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||
if (upcean) {
|
||||
if (symbology == BARCODE_EANX_CC && (primary_len <= 8 || (addon_posn && addon_posn <= 8))) {
|
||||
bwipp_barcode = "ean8composite";
|
||||
if (addon_posn) {
|
||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%spermitaddon",
|
||||
strlen(bwipp_opts_buf) ? " " : "");
|
||||
}
|
||||
}
|
||||
if (addon_posn) {
|
||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%saddongap=%d",
|
||||
|
@ -2951,6 +2955,10 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||
if ((symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK)
|
||||
&& (data_len <= 8 || (addon_posn && addon_posn <= 8))) {
|
||||
bwipp_barcode = data_len <= 3 ? "ean2" : data_len <= 5 ? "ean5" : "ean8";
|
||||
if (addon_posn) {
|
||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%spermitaddon",
|
||||
strlen(bwipp_opts_buf) ? " " : "");
|
||||
}
|
||||
}
|
||||
if (symbology == BARCODE_ISBNX) {
|
||||
testUtilISBNHyphenate(bwipp_data, addon_posn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue