1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-18 10:27:09 +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:
gitlost
2025-11-04 23:02:10 +00:00
parent 543696cb06
commit f0c7248b62
82 changed files with 2203 additions and 2187 deletions

View File

@@ -550,7 +550,7 @@ INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[],
unsigned char *data;
int *pSet;
uchar *pOutput;
const int raw_text = symbol->output_options & BARCODE_RAW_TEXT;
const int content_segs = symbol->output_options & BARCODE_CONTENT_SEGS;
const int debug = symbol->debug & ZINT_DEBUG_PRINT;
/* Suppresses clang-analyzer-core.VLASize warning */
@@ -567,7 +567,7 @@ INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[],
symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */
}
z_hrt_cpy_nochk(symbol, ZCUCP(""), 0); /* Zap HRT for compatibility with CODABLOCKF */
/* Use `raw_text` from `zint_code128()` */
/* Use `content_segs` from `zint_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) */
@@ -882,13 +882,13 @@ INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[],
symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */
}
if (raw_text) {
if (content_segs) {
if ((symbol->input_mode & 0x07) == DATA_MODE) {
if (z_rt_cpy(symbol, source, length)) {
return ZINT_ERROR_MEMORY; /* `z_rt_cpy()` only fails with OOM */
if (z_ct_cpy(symbol, source, length)) {
return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */
}
} else if (z_rt_cpy_iso8859_1(symbol, source, length)) {
return ZINT_ERROR_MEMORY; /* `z_rt_cpy_iso8859_1()` only fails with OOM */
} else if (z_ct_cpy_iso8859_1(symbol, source, length)) {
return ZINT_ERROR_MEMORY; /* `z_ct_cpy_iso8859_1()` only fails with OOM */
}
}