1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-05-14 18:13:53 +00:00

DBAR_OMN/DBAR_LTD/DBAR_STK/DBAR_OMNSTK: prefix raw_segs with

implicit "01" prefix (see ZXing-C++ issue 883);
  allow and ignore prefixes "01", "[01]" and "(01)" if check digit
  given (ticket #333, props Axel Waggershauser);
CODE128/PDF417: suppress some clang-tidy-20.1 warnings
general: add `ZUCP()`, `ZCUCP()`, `ZCCP()` macro shorthands to
  cast away char pointer signedness
This commit is contained in:
gitlost
2025-04-05 00:19:13 +01:00
parent 01c9b82504
commit 789e049945
7 changed files with 182 additions and 129 deletions

View File

@@ -2767,8 +2767,8 @@ static void test_raw_text(const testCtx *const p_ctx) {
/* 18*/ { BARCODE_CODE49, GS1_MODE, "[01]12345678901231", "0112345678901231" },
/* 19*/ { BARCODE_CODE93, -1, "1234567890", "1234567890M%" },
/* 20*/ { BARCODE_FLAT, -1, "1234567890", "" },
/* 21*/ { BARCODE_DBAR_OMN, -1, "1234567890123", "12345678901231" },
/* 22*/ { BARCODE_DBAR_LTD, -1, "1234567890123", "12345678901231" },
/* 21*/ { BARCODE_DBAR_OMN, -1, "1234567890123", "0112345678901231" },
/* 22*/ { BARCODE_DBAR_LTD, -1, "1234567890123", "0112345678901231" },
/* 23*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "0112345678901231" },
/* 24*/ { BARCODE_TELEPEN, -1, "1234567890", "1234567890n" },
/* 25*/ { BARCODE_UPCA, -1, "12345678901", "123456789012" },
@@ -2804,8 +2804,8 @@ static void test_raw_text(const testCtx *const p_ctx) {
/* 55*/ { BARCODE_NVE18, -1, "12345678901234567", "00123456789012345675" },
/* 56*/ { BARCODE_JAPANPOST, -1, "1234567890", "" },
/* 57*/ { BARCODE_KOREAPOST, -1, "123456", "1234569" },
/* 58*/ { BARCODE_DBAR_STK, -1, "1234567890123", "12345678901231" },
/* 59*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", "12345678901231" },
/* 58*/ { BARCODE_DBAR_STK, -1, "1234567890123", "0112345678901231" },
/* 59*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", "0112345678901231" },
/* 60*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "0112345678901231" },
/* 61*/ { BARCODE_PLANET, -1, "12345678901", "123456789014" },
/* 62*/ { BARCODE_MICROPDF417, -1, "1234567890", "" },
@@ -2837,13 +2837,13 @@ static void test_raw_text(const testCtx *const p_ctx) {
/* 88*/ { BARCODE_CODE32, -1, "12345678", "3PRM8N" },
/* 89*/ { BARCODE_EANX_CC, -1, "123456789012", "1234567890128|2001" },
/* 90*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "0112345678901231|2001" },
/* 91*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "12345678901231|2001" },
/* 92*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "12345678901231|2001" },
/* 91*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "0112345678901231|2001" },
/* 92*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "0112345678901231|2001" },
/* 93*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "0112345678901231|2001" },
/* 94*/ { BARCODE_UPCA_CC, -1, "12345678901", "123456789012|2001" },
/* 95*/ { BARCODE_UPCE_CC, -1, "1234567", "12345670|2001" },
/* 96*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "12345678901231|2001" },
/* 97*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "12345678901231|2001" },
/* 96*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "0112345678901231|2001" },
/* 97*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "0112345678901231|2001" },
/* 98*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "0112345678901231|2001" },
/* 99*/ { BARCODE_CHANNEL, -1, "01", "" },
/*100*/ { BARCODE_CODEONE, -1, "12345678901234567890", "" },