1
0
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:
gitlost
2025-11-04 23:02:10 +00:00
parent 543696cb06
commit f0c7248b62
82 changed files with 2203 additions and 2187 deletions

View File

@@ -335,7 +335,7 @@ INTERNAL int zint_code16k(struct zint_symbol *symbol, unsigned char source[], in
int error_number = 0, first_sum, second_sum;
const int gs1 = (symbol->input_mode & 0x07) == GS1_MODE;
/* GS1 raw text dealt with by `ZBarcode_Encode_Segs()` */
const int raw_text = !gs1 && (symbol->output_options & BARCODE_RAW_TEXT);
const int content_segs = !gs1 && (symbol->output_options & BARCODE_CONTENT_SEGS);
const int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
if (length > C128_MAX) {
@@ -593,13 +593,13 @@ INTERNAL int zint_code16k(struct zint_symbol *symbol, unsigned char source[], in
symbol->border_width = 1; /* BS EN 12323:2005 Section 4.3.7 minimum (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 */
}
}