in `ESCAPE_MODE`
composite: empty primary now returns `ZINT_ERROR_INVALID_DATA`
rather than `ZINT_ERROR_INVALID_OPTION`;
check that primary NUL-terminated
library: check that `outfile` NUL-terminated
gs1: preface all routines and linters with "gs1_"
general: some code fiddling
`BARCODE_EAN_5ADDON`, `BARCODE_EAN13`, `BARCODE_EAN8_CC` and
`BARCODE_EAN13_CC` as replacements for `BARCODE_EANX`,
`BARCODE_EANX_CHK` and `BARCODE_EANX_CC` and use in CLI/GUI
(`BARCODE_EANX` etc. marked as legacy)
- For EAN/UPC accept space as alternative add-on separator to '+',
and accept GTIN-13 format with & without 2-digit or 5-digit
add-on (no separator)
- Buffer length of member `errtxt` in `zint_symbol` extended 100
-> 160 (will be sufficient for eventual translation and
gs1-syntax-dictionary errors hopefully)
- UPC-E: warn if first digit of 7 (or 8 if check digit given) not
'0' or '1'
- manual: update for new EAN symbologies and mention EANX now
legacy but still supported
and place any add-on data directly after (no separator)
EAN-8 + add-on: warn as non-compliant (see ZXing-C++ issue #883,
https://github.com/zxing-cpp/zxing-cpp/issues/883)
test suite: BWIPP: use new EAN-8 + add-on option "permitaddon";
fix dumps of RAW_TEXT `memcmp()`s fails; various re-formatting
bwipp_dump.ps: update to latest BWIPP
followed by digit (ignore 2nd byte of FNC4 when categorizing
Code C characters)
- New `ZBarcode_Cap()` flag `ZINT_CAP_BINDABLE`, differentiated
from `ZINT_CAP_STACKABLE`, and new Qt Backend method
`isBindable()`
- CLI: fix `separator` check to use new `ZINT_CAP_BINDABLE` instead
of `ZINT_CAP_STACKABLE`
- ZBarcode_Cap: add missing symbologies to `ZINT_CAP_BINDABLE` (was
`ZINT_CAP_STACKABLE`)
- DOTCODE: pad rows if given number of columns instead of failing
if rows below min (5)
- DBAR/composites: ensure stacked symbologies and composites are
not stacked (set `symbol->rows` to 0)
- test suite: move `test_perf` routines into single test
"test_perf";
new "test_random" (based on "test_bwipp") to test various
symbologies with random binary - discovered CODABLOCKF bug;
expand "test_bwipp"
manual: Feeback: mention AZTEC -1 meaning min & MICROPDF417:
doc new `ZINT_CAP_BINDABLE`
general: various code fiddlings and re-formattings
fields `raw_segs` and `raw_seg_count` instead of `text`, and to
do so for all symbologies, using new common funcs `rt_cpy()` etc.
MICROPDF417: return ECC percentage in top byte of `option_1`
DBAR_EXP_STK: return `option_2`/`option_3` feedback
CLI: change warning text "ignoring" -> "**IGNORED**"
GUI: show feedback for DBAR_EXP_STK, MICROPDF417, UPNQR
ctest: fix recent inability to run tests via "ctest" on Windows
(MSVC) by using cmake 3.22 feature `ENVIRONMENT_MODIFICATION`
manual: document feedback and RAW_TEXT in new "Feedback" section;
rephrase some symbology descriptions
test suite: new general-use arg "-a"; add `func_name` to context;
new "test_bwipp" test for testing BWIPP against ZXing-C++
DOTCODE/GRIDMATRIX/HANXIN/MICROPDF417/MICROQR/PDF417/QRCODE/
RMQR/ULTRA: set `option_1/2/3` to values used in encodation
("Feedback options"), and add new access methods
`encodedOption1()` etc. to Qt Backend, and use in GUI to provide
better feedback on "Automatic" selections
- AZTEC: give more precise warnings in low ECC situations, and
indicate via `option_1` by setting to -1 (min 3 words), 0
(<5% + 3 words) (`ecc_ratio`)
- set_height: fix non-compliance false positives by using epsilon
in checks (prompted by CODABLOCKF non-compliant warning for
zint-generated compliant height - floating point `rows` mult !=
`zero_count` div; one test regression for CODE93);
better warning messages on non-compliant heights (min/max)
- manual/man page: fix DATAMATRIX Sizes tables "28 12x26" ->
"27 12x26"
- GUI: AZTEC/CODEONE: add Zint versions to comboboxes
- DOTCODE: improve error messages re size too small/large
- ULTRA: better ZINT_TEST codeword dump (ZINT_DEBUG_TEST)
- general: various tabs -> spaces; prettify main .rc files;
trailing spaces; small amount of code fiddling (CODE16K)
`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
and suppress errors in lib and backend tests (pretty sure they're
nearly all false positives apart from maybe 2 non-initializations
in "gif.c" (`pOut` buffer) and "raster.c" (`rotated_pixbuf`)
github: install de_DE.UTF-8 locale in ubuntu-debug also
to suppress warnings about `errtxtf` operand number "%<n>$" args;
enable some further warnings
test suite: enable -Wpedantic and fix/suppress any warnings
change # 147 -> 127 to use up barcode # holes;
use "common.h" funcs `str_to_uppercase()` -> `to_upper()`,
`count_char_occurrences()` -> `chr_cnt()`;
prefix defines with `DX_` and funcs with `dx_`;
`ZINT_DEBUG_PRINT` -> `symbol->debug & ZINT_DEBUG_PRINT`;
bools to ints; use `posn()` to check for slash (returns length);
restrict line lengths to 118; suppress some clang-tidy warnings;
normalize some error messages;
check for single "A" if any (`sscanf()`);
use compliant height default; some whitespace formatting;
Tcl: add DXFILMEDGE support
docs: document DXFILMEDGE; update to latest pandoc
test suite: ZXingCPP: DXFILMEDGE support
around 20% slower than current but much better;
numerous other fiddlings
reedsol: reverse result in `rs_*encode*()` routines & adjust
clients appropriately (may replace later with something faster)
test suite: cater for MAXICODE SCM better; add assert & dataset
totals
BWIPP: update to latest
gen_gs1_lint.php: restrict line length to 118 for func calls
encodation in certain cases (and no pessimizations found so far),
props lyngklip (BWIPP);
fix extended char latching when exactly 3 extended chars at end;
count code set C (not digits) in loop deciding when to
shift/latch to extended for better estimate
AZTEC: return warning if ECC < 5% (due to bit-stuffing when version
given); return error if > 22 layers (Zint 26) for Reader
Initialisation symbol requested for better error message
AZTEC/HANXIN/QRCODE: consolidate different ECC data size tables
into one indexed by ECC
DBAR_EXP: check for reduced length <= 77 up front for better error
message
HANXIN: use `malloc()` rather than `z_alloca()` for large binary
array
QRCODE: `ecc_level` now 0-based (not 1-based)
MICROQR: consolidate different version end routines into one
`microqr_end()` and use new `microqr_data` table to simplify code
MICROPDF417: use table for max codewords per column
library: centralize all error messages using new `errtxt()`,
`errtxtf()`, `errtxt_adj()` funcs that protect `symbol->errtxt`
from overflow, & try to make error messages more consistent
thru-out, adding more feedback info to many, & use positional
args "%n$" in prep for l10n (maybe);
`is_sane/is_sane_lookup()` -> `not_sane/not_sane_lookup()`,
returning 1-based position (zero on failure) instead of bool;
`long` ints -> plain `int` (except those dealing with `ftell()`,
`fread()` etc) as depend on int being 32-bits already
GUI: in "grpDATF.ui" use "PlainText" rather than "RichText" for
tracker ratio examples as height of text messing up sometimes
manual: clarify Codablock-F length maximum & add examples
docs: README: pandoc 3.5, Ubuntu 24.04
CMake: use "-Wpedantic" for Clang only as GNU complains about
`errtxtf()` positional args "%n$"
`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)
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
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)
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
(was only set on BMP output to length of BMP pixel array)
EXCODE39: change to display check digit in HRT by default
CODE39/EXCODE39/LOGMARS: new hidden check digit option
(`option_2 = 2`)
qr.c: suppress bogus gcc-13 warning (only appears on optimize)
GUI: move some symbology-specific options into Data Tab so
separate tab unnecessary (those with few options and no
Composite/ECI), namely: all C25XXX, CODE39/EXCODE39/LOGMARS,
MSI_PLESSEY, CODABAR, DAFT, DPD, MAILMARK_2D, ITF-14, PZN,
UPNQR, CHANNEL, CODE93 and VIN, adjusting grp uis.
change Data dialog button (ellipsis) QToolButton -> QPushButton
& vice versa zap/clear/eye/swap/scale buttons QPushButton ->
QToolButton for better mac compat (also makes sense);
remove some mac hacks that no longer seem necessary;
use folder icon for Export dialog directory button
manual: document new Symbology-specific groupbox & CODE39/etc
hidden check digit option; add annexes on Qt and Tcl backends;
narrow some tables for better txt output;
remove echoed image tags in txt (pandoc 3.1.5 regression?);
add one-page HTML output to Makefile; also tex output (debug);
add class attributes to images to aid HTML styling;
various other fiddlings
Allow `--embedfont` for non-EAN/UPC SVG also (& update GUI)
SVG: add "fonts/normal_woff2.h"; use array syntax for it &
"fonts/upcean_woff2.h" to avoid large strings
GUI: embed Arimo (via "fonts/normal_ttf.h"), same as OCRB
Change textgap max 5X -> 10X
README: make list of barcodes 2-col table for readability
win32/README: note Visual Studio 2022 re CMake
barcode and text
- EMF/EPS/SVG/GUI: ignore BOLD_TEXT for EAN/UPC
- DAFT: up max to 250 chars
- EMF/EPS/SVG: fix addon bars placement/length when text hidden
- Qt backend: use `QFontMetrics::horizontalAdvance()` rather than
`boundingRect()` to calc text width (seems to be more accurate)
- library: make printf/sprintf() format arg always literal string
- output: fix errtxt nos clash;
use array for `out_upcean_split_text()` text parts
- raster/vector: smallify addon text printing logic
- frontend: warn if output file and direct options both given;
add TODO note about `CommandLineToArgvW()` loading shell32.dll
- manual: put HRT options in own section
for manual Code Set switching via `input_mode` flag
`EXTRA_ESCAPE_MODE` (CLI `--extraesc`) (ticket #204)
- GUI: disable "Reset" colour if default; add "Unset" to Printing
Scale dialog (allows unsetting of X-dim/resolution settings
without having to zap)
- library: guard against out-of-bounds rows (negative)
- test suite: fix some clang-tidy warnings; slight coverage
improvements
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG)
- Add support for specifying scale by X-dimension and resolution
with new option `--scalexdimdp` for CLI/Tcl & new API function
`ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()`
& `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document
- BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF
following Inkscape)
- backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`,
`noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff
incl. new `QZintXdimDp` struct for passing around scale vars &
use in `getAsCLI()`; add comments
- Raise `scale` limit to 200 (from 100) to allow for large dpmm
- output: create directories & subdirectories as necessary for
output path using new function `out_fopen()` and use in BMP/EMF/
EPS/GIF/PCX/PNG/SVG/TIF
- DPLEIT/DPIDENT: format HRT according to (incomplete)
documentation, and set default height to 72X (from 50X)
- CODE128B renamed to CODE128AB as can use subsets A and/or B
- CODABAR: fix minimum height calc
- EMF: fix indexing of handles (zero-based not 1-based)
- GUI: fix symbology zap (previous technique of clearing and
re-loading settings without doing a sync no longer works);
fix UPCEAN guard descent enable
- MAILMARK: better error message if input < 14 characters
- GUI: add "Default" button for DAFT tracker ratio & enable/disable
various default buttons; use new `takesGS1AIData()` to
enable/disable GS1-specific checkboxes
- CLI: use new `validate_float()` to parse float options (7
significant digits allowed only, no scientific notation)
- DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp
ID parse
- library/CLI: fiddle with static asserts (make CHAR_BIT sensitive,
supposedly)
- win32/README: update building libpng (assembly removed)
- README.linux: document incompatibility of Qt6 >= 6.3
- manual: expand Barcode Studio waffle
- test suite: change range separator to hyphen and allow multiple
excludes
QRCODE: use stricter interpretation of ZINT_FULL_MULTIBYTE, excluding
certain trailing bytes
libzint: fix some confusing error messages introduced by segment stuff
general: new escape chars \U, \d and \o
backend_qt: fudge rendering of border rectangles due to scaling/translation
rounding errors TODO: better fudge
GUI: foreground/background colours -> text boxes and icon buttons, add swap
button, independently movable picker (NULL parent), preview colour changes,
preview Data Window changes, add clear data (del) buttons, add zap button
and Factory Reset menu option, various other fixes
libzint: remove STATIC_UNLESS_ZINT_TEST, use wrappers
CMake: add find package QtSvg, remove QtXml
manual: split symbology and general specs and sort, move DAFT to 4-state,
UPC/EAN -> EAN/UPC, DataBar -> GS1 DataBar always, expand MAILMARK info,
various other fiddlings
man page: options or -> |, expand MSI Plessey check digit options
README.linux: add packages info
license: add SPDX-License-Identifier to touched files
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
Add FAST_MODE input_mode flag and --fast CLI/Tcl option that selects older
faster ISO algorithm (may be used by other symbologies in the future)
and "Fast Encoding" checkbox to Data Matrix GUI
GUI: adds Zint version numbers to DATAMATRIX sizes.
other than for digits (worse for TEX 7-11 embedded in extended) and for
returning X12/EDI at EOD - will cause changes in encodation;
allow for GS1 GS in B256 (should never happen);
some re-jigging of dm200encode and fiddling with dm_isXXX;
remove some DM_DEBUG from dm_placementbit