mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-17 18:07:02 +00:00
library: use "filemem" for TXT dump_plot() -> txt_hex_plot()
filemem: remove NOLINTS (clang-tidy-20 bug fixed) QRCODE: eliminate NOLINTs using some more asserts (clang-tidy-20); some "de-branching" of loops general: various code fiddlings, in particular lessen no. of redundant parenthesized expressions, especially in conditionals, which reduce rather than aid readibility IMNSHO manual: mention "--dump" option
This commit is contained in:
@@ -71,12 +71,11 @@ INTERNAL int zint_codabar(struct zint_symbol *symbol, unsigned char source[], in
|
||||
z_to_upper(source, length);
|
||||
|
||||
/* Codabar must begin and end with the characters A, B, C or D */
|
||||
if ((source[0] != 'A') && (source[0] != 'B') && (source[0] != 'C')
|
||||
&& (source[0] != 'D')) {
|
||||
if (source[0] != 'A' && source[0] != 'B' && source[0] != 'C' && source[0] != 'D') {
|
||||
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 358, "Does not begin with \"A\", \"B\", \"C\" or \"D\"");
|
||||
}
|
||||
if ((source[length - 1] != 'A') && (source[length - 1] != 'B') &&
|
||||
(source[length - 1] != 'C') && (source[length - 1] != 'D')) {
|
||||
if (source[length - 1] != 'A' && source[length - 1] != 'B' && source[length - 1] != 'C'
|
||||
&& source[length - 1] != 'D') {
|
||||
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 359, "Does not end with \"A\", \"B\", \"C\" or \"D\"");
|
||||
}
|
||||
if ((i = z_not_sane_lookup(CALCIUM, sizeof(CALCIUM) - 1, source, length, posns))) {
|
||||
|
||||
Reference in New Issue
Block a user