1
0
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:
gitlost
2025-08-28 20:34:56 +01:00
parent 36364b4912
commit 44e2099a65
35 changed files with 507 additions and 588 deletions

View File

@@ -129,11 +129,11 @@ INTERNAL int zint_pcx_pixel_plot(struct zint_symbol *symbol, const unsigned char
previous = rle_row[0];
run_count = 1;
for (column = 1; column < bytes_per_line; column++) { /* Note going up to bytes_per_line */
if ((previous == rle_row[column]) && (run_count < 63)) {
if (previous == rle_row[column] && run_count < 63) {
run_count++;
} else {
if (run_count > 1 || (previous & 0xc0) == 0xc0) {
run_count += 0xc0;
if (run_count > 1 || (previous & 0xC0) == 0xC0) {
run_count += 0xC0;
zint_fm_putc(run_count, fmp);
}
zint_fm_putc(previous, fmp);
@@ -142,8 +142,8 @@ INTERNAL int zint_pcx_pixel_plot(struct zint_symbol *symbol, const unsigned char
}
}
if (run_count > 1 || (previous & 0xc0) == 0xc0) {
run_count += 0xc0;
if (run_count > 1 || (previous & 0xC0) == 0xC0) {
run_count += 0xC0;
zint_fm_putc(run_count, fmp);
}
zint_fm_putc(previous, fmp);