mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 02:47:06 +00:00
general: raw_segs -> content_segs, BARCODE_RAW_TEXT ->
`BARCODE_CONTENT_SEGS`, `z_rt_XXX()` -> `z_ct_XXX()`; move `encoded_data`/`row_height` to end of `zint_symbol` (see ZXing-C++ issue #883) manual: update re `content_segs`; `my_symbol` -> `symbol`; improve MicroPDF417 description
This commit is contained in:
@@ -56,7 +56,7 @@ INTERNAL int zint_code11(struct zint_symbol *symbol, unsigned char source[], int
|
||||
int num_check_digits;
|
||||
unsigned char checkstr[2];
|
||||
int error_number = 0;
|
||||
const int raw_text = symbol->output_options & BARCODE_RAW_TEXT;
|
||||
const int content_segs = symbol->output_options & BARCODE_CONTENT_SEGS;
|
||||
|
||||
/* Suppresses clang-tidy clang-analyzer-core.UndefinedBinaryOperatorResult warning */
|
||||
assert(length > 0);
|
||||
@@ -151,8 +151,9 @@ INTERNAL int zint_code11(struct zint_symbol *symbol, unsigned char source[], int
|
||||
z_hrt_cat_nochk(symbol, checkstr, num_check_digits);
|
||||
}
|
||||
|
||||
if (raw_text && z_rt_cpy_cat(symbol, source, length, '\xFF' /*separator (none)*/, checkstr, num_check_digits)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_rt_cpy_cat()` only fails with OOM */
|
||||
if (content_segs && z_ct_cpy_cat(symbol, source, length, '\xFF' /*separator (none)*/, checkstr,
|
||||
num_check_digits)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_ct_cpy_cat()` only fails with OOM */
|
||||
}
|
||||
|
||||
return error_number;
|
||||
|
||||
Reference in New Issue
Block a user