1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-05-10 16:13:50 +00:00

general: change BARCODE_RAW_TEXT to write to new zint_symbol

fields `raw_segs` and `raw_seg_count` instead of `text`, and to
  do so for all symbologies, using new common funcs `rt_cpy()` etc.
MICROPDF417: return ECC percentage in top byte of `option_1`
DBAR_EXP_STK: return `option_2`/`option_3` feedback
CLI: change warning text "ignoring" -> "**IGNORED**"
GUI: show feedback for DBAR_EXP_STK, MICROPDF417, UPNQR
ctest: fix recent inability to run tests via "ctest" on Windows
  (MSVC) by using cmake 3.22 feature `ENVIRONMENT_MODIFICATION`
manual: document feedback and RAW_TEXT in new "Feedback" section;
  rephrase some symbology descriptions
test suite: new general-use arg "-a"; add `func_name` to context;
  new "test_bwipp" test for testing BWIPP against ZXing-C++
This commit is contained in:
gitlost
2025-03-28 10:02:19 +00:00
parent d1bf02e156
commit a6c225447e
120 changed files with 10511 additions and 5620 deletions

View File

@@ -134,11 +134,13 @@ INTERNAL int codabar(struct zint_symbol *symbol, unsigned char source[], int len
(void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
}
if (symbol->option_2 == 2 || (raw_text && add_checksum)) {
/* Place before final A/B/C/D character (BS EN 798:1995 A.3) */
hrt_printf_nochk(symbol, "%.*s%c%c", length - 1, source, CALCIUM[checksum], source[length - 1]);
} else {
hrt_cpy_nochk(symbol, source, length);
/* If visible check char, place before final A/B/C/D character (BS EN 798:1995 A.3) */
hrt_cpy_cat_nochk(symbol, source, length - 1, symbol->option_2 == 2 ? CALCIUM[checksum] : '\xFF',
source + length - 1, 1);
if (raw_text && rt_cpy_cat(symbol, source, length - 1,
add_checksum ? CALCIUM[checksum] : '\xFF', source + length - 1, 1)) {
return ZINT_ERROR_MEMORY; /* `rt_cpy_cat()` only fails with OOM */
}
return error_number;