from ZXing (props Alex Geller) - about 25-60% slower depending on
data & stack heavy but does improve some outcomes when FNC1s
present (GS1_MODE or manual) although not much else it appears
(the previous algorithm was very good), but has a logical clarity
the other lacked - funcs `c128_dxsmooth()` etc shared with
CODE16K now moved there and renamed as `c16k_`;
also fix extended char latching when exactly 4 extended chars
at end
also manual code set switching now honoured exactly even if
immediate shift required;
manual: make explicit that AI "(00)" and "(01)" prefixes added by
Zint are HRT-only
general: add `extern "C"` wrappers to a few header files
ticket #324, props Jim Shank;
also improve encodation for a few limited cases;
also some code fiddling
BWIPP: update to latest
raster: check for overflow on `size + size2` in `raster_malloc()`
vector: put `malloc()`s on one line for grep ease
docs: pandoc-3.3, clang-tidy-20
`iso3166list` linter and adjusting all others to allow for
multiple optional linters (by checking `data_len` vs `offset`)
library: change invalid `input_mode` reset to return warning;
split func table into 2 - func declarations without prototype
will be error in C23;
make invalid symbology check a separate function using a table
and call near beginning of `ZBarcode_Encode_Segs()`;
in `ZBarcode_BarcodeName()` save some bytes by simplifying
name table and removing "BARCODE_" prefix from entries
output: fix pack logic to use pragma by default (actually more
portable than `__attribute__`)
common.h: remove C99 detection which was artifice of specifying
"-std=", and rejig layout to be more logical
BWIPP: update to latest version
general: change `ZINT_VERSION_BUILD` tests to `#if`s
general: further fiddling with some tables to save a few bytes
CLI: change function arg `optarg` -> `arg` so doesn't shadow
global
general: library now compilable with Comp Cert C (though as it
doesn't support `alloca()` will have multiple memory leaks)
[f3a982c1dd])
AZTEC/CODE16K/CODEONE/DATAMATRIX/DBAR_EXP/GRIDMATRIX/HANXIN
/MAILMARK_4S/PDF417/MSI_PLESSEY/QRCODE/RMQR/TIF/ULTRA/USPS_IMAIL:
lessen storage of some tables by using least integral size
required (saves ~3K); reformat some tables, comments
AUSPOST/AZTEC: remove unnecessary int casts on array indexing
CODE11/CODE39: move start/stop chars into one entry in tables to
save a few bytes; some reformatting, comments
CODEONE: add `c1_` prefixes
common: more precise compiler/version checks
composite: add `cc_` prefixes; UINT -> unsigned short; use
`sizeof()` instead of `strlen()` for `in_linear_comp` static;
some reformatting, comments
EMF: use table instead of string for `ultra_chars[]`
GIF: remove unnecessary cast
library: use `sizeof()` instead of `strlen()` for static;
add `consts` to `escape_char_process()` & use unsigned for `ch`
DBAR: use `dbar_`, `dbar_ltd_`, `dbar_exp_` prefixes
docs: update pandoc version
allow for old "libpng" (`png_set_scale_16()` not available)
general: Solaris compat
library: use proper function ptr instead of `void *` for function
table; warning suppression "-Wpedantic" -> "-Wstrict-prototypes"
GRIDMATRIX/HANXIN/QRCODE: `xx_define_mode()`: multi-dim `char_modes`
- GUI: scalewindow: fix cropping resolution on initial setup
(`spnResolution` max 1000 -> 254000) and bound X-dim to <= 10 in
`set_maxima()`
- GUI: mainwindow: bound X-dim as above and clamp `m_xdimdpVars`
members on initial load from INI
- GUI: undo `QString::mid()` -> `QString::midRef()` from clazy
& explicitly include "QObject" in "qzint.h" (not Qt6 compatible)
and `out_colour_get_cmyk()`, to lessen chances of rounding
errors (in particular for VC6)
test_large: fix regression in change to test for formatting
`uint64_t` for `printf()`
win32/README: update MinGW/MSYS Qt version
test `ferror()` also in `fm_err()` if `err` zero and file
NetBSD: add instructions and some workarounds (`getopt_long_only()`
in particular)
qzint: check `__GNUC__` version for "-Wstringop-truncation"
suppression
outputting to in-memory buffer `symbol->memfile` instead of to
file `symbol->outfile`, ticket #301
Add "README.clang-tidy" and ".clang-tidy" options file
Suppress some warnings
`size_t` as appropriate)
- BMP: lessen heap memory usage by only `malloc()`ing a row, not
whole file
- GIF: lessen heap memory usage by paging (also simplifies some
function returns); use standard colour char map
- raster: add `raster_malloc()` to fail > 1GB (avoids very large
output files that most systems can't handle; also lessens to
some degree chances of being victim of OOM killer on Linux)
- GUI: printing scale dialog: set maxima on X-dim and resolution
to keep scale <= 200
whjitespace at bottom of CODABLOCKF/CODE16K/CODE49 if BIND_TOP
set); add left/right fudge to guard whitespace placements so
appear closer to edge for SVG/qzint (undone by EMF/EPS)
`qr_in_numeric()`/`hx_in_numeric()` (restrict to 3, not 4),
ticket #300 (#16), props Andre Maute
manual: "Maxicode" -> "MaxiCode"; add max capacities for matrix
barcodes
GS1 percents in `qr_in_alpha()`, ticket #300, props Andre Maute;
also defensively re-calc version 40 mode to prevent possible
further crashes
common: move `debug_print_escape()` from library to common
`gs1_verify()` by checking length before `to_int()`, ticket
#300 (#11), props Andre Maute
CODEONE: fix out-of-bounds crash for Version T by upping buffer
size to same as for A to H, ticket #300 (#12), props Andre Maute
GS1_128_CC: fix divide-by-zero crash in `calc_padding_ccc()` by
allowing for min linear width 68 in `cc_width` calc, ticket #300
(#13), props Andre Maute
BWIPP: update `bwipp_dump.ps` to latest version, update
`gen_gs1_lint.php` to accommodate `req` "+"
PDF417: change `liste[]` int -> short to lessen stack usage
Some variable name and code fiddlings
in `cc_binary_string()`, ticket #300 (#5 & #6), props Andre Maute;
add other checks for length on processing encoding mode
PDF417: fix out-of-bounds crash on overrunning string and codeword
buffers by tripling size (convert to `short` instead of `int` to
guard against too much stack), ticket #300 (#7 & #10), props Andre
Maute; (TODO: add some checks instead to bail out earlier?)
CODEONE: fix looping on latch crash in `c1_encode()`, ticket #300 (#8),
props Andre Maute
CODABLOCKF: fix crash on negative overflow of `columns` (`option_2`),
ticket #300 (#9), props Andre Maute
library: add `debug_print_escape()` helper for ZINT_DEBUG_PRINT
add overrun check of `adjusted_string` before padding in
user-specified size case but probably can't happen;
various fiddlings with code to make a bit more concise
ticket #300, props Andre Maute;
fix 4-layer compact block max (76 -> 64);
fix encoding of byte-blocks > 11-bit limit
library: fix 21-bit Unicode conversion in `escape_char_process()`;
fix restricting escaped data length by using de-escaped length to
check (`escape_char_process()` adapted to do length only calc
also)
MSI_PLESSEY/FLAT/DAFT/TELEPEN/TELEPEN_NUM: increase allowed
lengths to max or near-max possible in 1152 modules for most
(all?) variable length input linear barcodes
USPS_IMAIL: suppress bogus clang-tidy warning re garbage value
(doesn't take `strlen()` into account?)
`pdf_num_stay()` to not call it if previous/next block is BYT;
also extend `pdf_asciix[]` to full 256 byte range (defensive & also can
use directly rather than checking range, ticket #300, props Andre Maute
rename `ZINT_CAP_EXTENDABLE` -> `ZINT_CAP_EANUPC`
(`ZINT_CAP_EXTENDABLE` marked as legacy)
CODE128: increase no. symbol chars max 60 -> 99
EAN-2/EAN-5: fix `BARCODE_BIND_TOP/BIND/BOX` output
GS1_128: warn if data > 48 (GS1 General Specifications max)
common: `is_extendable()` -> `is_ucpean()`
raster: add `ZFONT_HALIGN_CENTRE/LEFT/RIGHT` flags and process
in `draw_string()` (for drawing EAN/UPC outside digits), and
for `ZFONT_HALIGN_CENTRE` round when calculating centre
(shifts some texts 1 pixel left)
raster/vector: use offsets into `symbol->text` for EAN/UPC
instead of `out_upcean_split_text()` (removed)
BMP/EMF/GIF/PCX/PNG/PS/SVG/TIF: use new `out_colour_get_rgb()`
routine (replaces `colour_to_XXX()`)
general: simplify/fix some `error_number` handling/returning
frontend: truncate overlong `--primary` instead of ignoring;
negative floating pt option (for `--textgap`)
man page: list size detail for matrix symbols (`--vers`)
manual: further fiddling with scaling text; some typos