1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-18 02:17:06 +00:00

Rename BARCODE_PLAIN_HRT -> BARCODE_RAW_TEXT and add warning

`ZINT_WARN_HRT_RAW_TEXT` if set when outputting HRT (ZXing-C++
  issue 883, props Axel Waggershauser)
README: Pharmacode -> One-Track, Pharmacode 2-trace -> Two-Track
This commit is contained in:
gitlost
2025-02-20 02:10:19 +00:00
parent 888b4b5684
commit 8e7931b147
55 changed files with 623 additions and 408 deletions

View File

@@ -50,7 +50,7 @@ INTERNAL int c25_inter_common(struct zint_symbol *symbol, unsigned char source[]
char *d = dest;
unsigned char local_source[125 + 1];
const int have_checkdigit = checkdigit_option == 1 || checkdigit_option == 2;
const int plain_hrt = symbol->output_options & BARCODE_PLAIN_HRT;
const int raw_text = symbol->output_options & BARCODE_RAW_TEXT;
if (length > 125) { /* 4 + (125 + 1) * 9 + 5 = 1143 */
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 309, "Input length %d too long (maximum 125)", length);
@@ -117,7 +117,7 @@ INTERNAL int c25_inter_common(struct zint_symbol *symbol, unsigned char source[]
}
}
if (checkdigit_option == 2 && !plain_hrt) {
if (checkdigit_option == 2 && !raw_text) {
/* Exclude check digit from HRT */
hrt_cpy_nochk(symbol, local_source, length - 1);
} else {