mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-23 19:46:56 -04: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:
parent
d1bf02e156
commit
a6c225447e
120 changed files with 10511 additions and 5620 deletions
|
@ -547,6 +547,7 @@ INTERNAL int codablockf(struct zint_symbol *symbol, unsigned char source[], int
|
|||
unsigned char *data;
|
||||
int *pSet;
|
||||
uchar *pOutput;
|
||||
const int raw_text = symbol->output_options & BARCODE_RAW_TEXT;
|
||||
|
||||
/* Suppresses clang-analyzer-core.VLASize warning */
|
||||
assert(length > 0);
|
||||
|
@ -562,6 +563,7 @@ INTERNAL int codablockf(struct zint_symbol *symbol, unsigned char source[], int
|
|||
symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */
|
||||
}
|
||||
hrt_cpy_nochk(symbol, (const unsigned char *) "", 0); /* Zap HRT for compatibility with CODABLOCKF */
|
||||
/* Use `raw_text` from `code128()` */
|
||||
if (symbol->output_options & COMPLIANT_HEIGHT) {
|
||||
/* AIM ISS-X-24 Section 4.6.1 minimum row height 8X (for compatibility with CODABLOCKF, not specced
|
||||
for CODE128) */
|
||||
|
@ -877,6 +879,10 @@ INTERNAL int codablockf(struct zint_symbol *symbol, unsigned char source[], int
|
|||
symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */
|
||||
}
|
||||
|
||||
if (raw_text && rt_cpy(symbol, source, length)) {
|
||||
return ZINT_ERROR_MEMORY; /* `rt_cpy()` only fails with OOM */
|
||||
}
|
||||
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue