mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-31 23:28:27 -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
|
@ -105,11 +105,11 @@ static int c25_common(struct zint_symbol *symbol, const unsigned char source[],
|
|||
|
||||
expand(symbol, dest, d - dest);
|
||||
|
||||
if (symbol->option_2 == 2 && !raw_text) {
|
||||
/* Exclude check digit from HRT */
|
||||
hrt_cpy_nochk(symbol, local_source, length - 1);
|
||||
} else {
|
||||
hrt_cpy_nochk(symbol, local_source, length);
|
||||
/* Exclude check digit from HRT if hidden */
|
||||
hrt_cpy_nochk(symbol, local_source, length - (symbol->option_2 == 2));
|
||||
|
||||
if (raw_text && rt_cpy(symbol, local_source, length)) {
|
||||
return ZINT_ERROR_MEMORY; /* `rt_cpy()` only fails with OOM */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -121,12 +121,6 @@ INTERNAL int c25standard(struct zint_symbol *symbol, unsigned char source[], int
|
|||
return c25_common(symbol, source, length, 112, 1 /*is_matrix*/, C25MatrixStartStop, 6, 301);
|
||||
}
|
||||
|
||||
/* Code 2 of 5 Industrial */
|
||||
INTERNAL int c25ind(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
/* 10 + (79 + 1) * 14 + 9 = 1139 */
|
||||
return c25_common(symbol, source, length, 79, 0 /*is_matrix*/, C25IndustStartStop, 6, 303);
|
||||
}
|
||||
|
||||
/* Code 2 of 5 IATA */
|
||||
INTERNAL int c25iata(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
/* 4 + (80 + 1) * 14 + 5 = 1143 */
|
||||
|
@ -139,4 +133,10 @@ INTERNAL int c25logic(struct zint_symbol *symbol, unsigned char source[], int le
|
|||
return c25_common(symbol, source, length, 113, 1 /*is_matrix*/, C25IataLogicStartStop, 4, 307);
|
||||
}
|
||||
|
||||
/* Code 2 of 5 Industrial */
|
||||
INTERNAL int c25ind(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
/* 10 + (79 + 1) * 14 + 9 = 1139 */
|
||||
return c25_common(symbol, source, length, 79, 0 /*is_matrix*/, C25IndustStartStop, 6, 303);
|
||||
}
|
||||
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue