1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-07-30 18:09:50 +00:00

1919 Commits

Author SHA1 Message Date
gitlost 6ac010af0e test suite: test_svg: add full Latin-1 examples 2026-07-30 17:01:43 +01:00
gitlost aa3f05d56a docs: latest pandoc 2026-07-30 14:48:21 +01:00
gitlost 42d1f6631a GRIDMATRIX/HANXIN/QRCODE: set Project Nayuki stuff copyright 2019
as that's when it was adapted
debian/copyright: incorporate above & remove "Copyright (C)"
  prefixes to make a bit more like the upstream Debian one
2026-07-29 19:56:09 +01:00
gitlost 92e94009b2 raster: base draw_mp_circle() on plotCircle() from
https://zingl.github.io/bresenham.c by Zingl Alois rather than
  RosettaCode one, better at small scales plus simplifies
  licence/attribution issues;
  fix licence/attribution issues for `plot_hexline()` also which
  is actually based on `plotLine()` in zingl code (ticket #357,
  props stefan6419846)
debian/copyright: update with above
2026-07-29 17:39:01 +01:00
gitlost 0132ee586b CLI: fix memory leak of my_symbol on error exit (ticket #358,
props Andre Maute)
debian/copyright: add Kentaro Fukuchi to BSD-3-clause
2026-07-29 15:21:27 +01:00
gitlost 929724b8dc debian/copyright: update to reflect last commit, also following:
testcommon:  mark as BSD-3-clause from LGPL-2.1+ as permission
  given (I think) by mailing list:
  https://sourceforge.net/p/zint/mailman/message/30810495/
2026-07-28 14:44:20 +01:00
gitlost 78a70fd891 dmatrix/reedsol: updated to reflect addtional re-licensing under
BSD-3-clause of the contributions of Andrews & Arnold Ltd. -
  many thanks to the Rev Adrian Kennard; corrected "reedsol"
  copyright; removed Stefan Schmidt copyright as only difference
  from originals is whitespace/formatting
  (ticket #357, props stefan6419846)
2026-07-28 14:22:03 +01:00
gitlost d6a4bdfe90 CLI: differentiate between unknown & ambiguous options using new
`is_ambiguous_opt()` func, which necessitated moving `options`
  enum & `long_options[]` to file scope, & sorting `long_options[]`
2026-07-26 02:49:26 +01:00
gitlost 3a76ce7a77 zint.h/man page: HRT max 199 -> 255 2026-07-08 00:14:02 +01:00
gitlost 4e534c3a09 GRIDMATRIX: fix byte latch 6 -> 7, & allowing more than one
non-digit in numeral (both caused misencodation);
  replace `gm_macro_matrix[]` array with calculation (marginally
  slower but saves ~1.4k);
  replace `gm_shift_set[]` use with simple compares (performance);
  change GM_CHINESE/etc defines to numbers so can index into new
  `gm_shift_set[]` array (simplifies mode switching code);
  GM_NUMBER -> GM_NUMERAL, modules -> macromodules_per_dim, various
  other renamings to hopefully more explanatory names;
  various other changes (mostly performance)
test suite: make use of new zxing-cpp diagnostics2 branch Grid
  Matrix decoder
manual: slight clarification of `--gs1nocheck`
BWIPP: latest
2026-07-06 01:22:54 +01:00
gitlost aadd94d288 CI: Add ubuntu-arm64 (ticket #355) 2026-07-01 14:13:43 +01:00
gitlost fdaed0b1c8 AZTEC: fix return type of az_all_byte_only_or_uld() char -> int
so that the -1 compare doesn't fail on default unsigned char
  machines (e.g. arm) (ticket #355, props codemonkey82)
2026-06-30 16:35:56 +01:00
gitlost a81c9d9258 CLI: make --mirror available in standard non-batch mode via
new routines `mirror_start()`, `mirror_outfile()` & limit
  substitutions on Unix to backslash (Windows remains the same);
  restrict "borderwidth", "textgap", "vwhitesp", "whitesp" < 100
CODEONE: fix `ceilf()` -> `C1_MULT_CEIL()` in FAST_MODE encodation
  (improves/changes some encodation)
composite: preserve `gs1_verify()` warning using `warn_level` hack;
  fix wrong name `zint_dbar_omnstk_set_height()` ->
  `zint_dbar_stk_set_height()`;
  use new `zint_micropdf_variant()` & `zint_micropdf_expand()`
  routines (see below)
MICROPDF417: move variant determination into new shareable routine
  `zint_micropdf_variant()` & expansion into `zint_micropdf_expand()`
qzint: add helper methods `setbordertypevalue()`,
  `encodedinputmode()`, `encodedoutputoptions()`,
  `ecivaluetoeciindex()` and `eciindextoecivalue()`
dbar: for performance pre-calculate `combins()` as array
coverage: add `malloc()`-type failure testing to AZTEC,
  CONTENT_SEGS, MEMORY_FILE, raster, Reed-Solomon & vector;
  numerous changes to remove unused code and test more branches
common: add `isxdigit()`
general: various code fiddlings
manual: add char names to sequence and batch format char tables;
  mention long options can be shortened (& use "--compliantheight"
  -> "--compliant");
  expand mirror explanation & document substitutions in footnote;
  workaround xecjk putting space after double quote when quoting
  cjk chars & rejig input mode examples;
  workaround html alignment bug in table gs1-enabled symbologies by
  adding extra rh dashes to header cols;
  add "figure nn: " to txt image tags via sed:
  various other small fixes and rephrasings
2026-06-23 23:25:23 +01:00
gitlost 4a60a0b068 CLI: warn if "--primary" given but not MaxiCode or Composite 2026-06-08 01:27:29 +01:00
gitlost 3bd322359a CI: win32/64: adjust for lib name change zs -> libzs 2026-06-05 20:22:35 +01:00
gitlost 6f60fccd9a pandoc: update to 3.10; add extension "four_space_rule" to
txt output to semi-restore previous behaviour;
  adjust GS1-Enabled table & command line so not > 80 chars;
  Fedora now requires tcolorbox install
BWIPP: update to latest
2026-06-05 19:17:58 +01:00
gitlost 919e7bf55c zint.h: move legacy barcode names to separate list for clarity;
remove refs to Tbarcode
2026-06-04 01:02:52 +01:00
gitlost 50d99dd5f4 CLI: add "Telepen Alpha", "Telepen Numeric" synonyms
TELEPEN/TELEPEN_NUM: ZINT_DEBUG_PRINT binary string
BWIPP: latest
test suite: allow for further reduced BWIPP DotCode max len
2026-05-29 03:57:09 +01:00
gitlost a52eec6b80 GUI: Telepen -> Telepen Alpha 2026-05-27 16:00:50 +01:00
gitlost bc080f6fa2 manual: rephrase some Telepen stuff
man page: Telepen -> Telepen Alpha
2026-05-27 15:40:53 +01:00
gitlost 771a1b3cdd TELEPEN/TELEPEN_NUM: support AIM-defined Start/Stop characters
with option "--vers=1" (API `option_2 = 1`);
  define minimum height based on AIM USS Telepen
TELEPEN_NUM: support switching to Full ASCII mode with DLE;
  max digits 136 -> 138
TELEPEN: support switching to Compressed Numeric Mode with DLE
  if AIM-defined Start/Stop enabled
CLI: make args for  "--dmb256", "--dmc40", "--scalexdimdp" and
  "--scmvv" optional
library: new escape sequences `\L`, `\F`, `\N`, & refactor parsing
  to use `escs` table
ZBarcode_Scale_From_XdimDp: allow TXT filetype (so "--dump" test
  works)
output: Telepen default quiet zone confirmed as 10X
aztec/dmatrix: fix source line too long
man page: embolden options and emphasize args;
  add barcode names to standards; various other fixes
2026-05-26 20:32:51 +01:00
gitlost 07777d044a aztec: debug_print: always print Binary String (wasn't if length 0) 2026-05-20 21:14:00 +01:00
gitlost 0b05c7a8c5 AZTEC: fix not allowing for lowercase AIM id (FNC1 2nd position) 2026-05-19 18:56:45 +01:00
gitlost bdb194b76a gs1se_verify: remove now-deprecated gs1_encoder_iNO_SYNDICT/iQUIET
flags from options & NULL-init new syntaxDictionary field
2026-05-16 09:25:08 +01:00
gitlost 09d48d5757 aztec: avoid possible overflow in comparison
output/CLI/testcommon: suppress some gcc-16 (C23) warnings
  "-Wdiscarded-qualifiers" (QChar)
GUI: suppress some gcc-16 (C23) warnings
  "-Wdeprecated-enum-enum-conversion"
channel: use explicit `const struct` for precalcs instead of
  typedef (makes code more transparent)
README.linux: Fedora 43 -> 44
2026-05-15 11:20:30 +01:00
gitlost 76aac611ca GUI: suppress some more "-Wshorten-64-to-32" warnings (qt5/6 diff)
AZTEC: better assert
BWIPP: latest
2026-05-06 22:49:41 +01:00
gitlost 0a617a410b common: move FM_NO_VSNPRINTF (filemem) -> Z_NO_VSNPRINTF & use
AZTEC: suppress MSVC warning C4761: integral size mismatch in arg
2026-05-05 21:34:58 +01:00
gitlost 88ca9cc43c CLI: help typo INTERGER -> INTEGER
man page: clarify GS1 input data formats
2026-04-29 17:44:37 +01:00
gitlost b0b8c28380 postal/qzint: suppress some "-Wshorten-64-to-32" warnings
auspost: check z_zero_fill > 0 (pedantic)
2026-04-27 18:05:34 +01:00
gitlost 0959e273a6 test suite: common: z_zero_fill: zeroize dest[] array 2026-04-27 01:16:00 +01:00
gitlost 0a3ffc1dc2 AZTEC: add manual FNC1 support:
improve P/S vs P/L choice when have ECI;
  add ZINT_DEBUG_TEST dump
AUSPOST: allow variable length data input
DATAMATRIX: do `EXTRA_ESCAPE_MODE` processing up front & check have
  non-zero length afterwards;
  disallow `READER_INIT` and `EXTRA_ESCAPE_MODE`;
general: add new `z_zero_fill()` func & use;
  add new `z_extra_escape_position_fnc1()` helper;
  in `z_ct_set_seg_extra_escapes_eci` check position FNC1 whether
  or not have ECI
library: escape_char_process: note escaped backslash followed by
  caret by passes `EXTRA_ESCAPE_MODE` check
test suite: BWIPP: update to latest; support AUSPOST variants;
  process `EXTRA_ESCAPE_MODE` escaping up front
2026-04-27 01:02:25 +01:00
gitlost b40393723f AUSPOST: support Null FCC (DPID all zeroes); TODO: BWIPP support
CODE128: properly fix not switching before FNC1 in 2nd position
  after alpha (commit [7b0767])
PLANET/KIX: adapt POSTNET to cater for both
general: use static strings to save a few bytes (start/stop in
  particular); various other code fiddles
postal: move tables into funcs
2026-04-22 21:25:16 +01:00
gitlost 7f688b9e58 BWIPP: update to latest, undo DBAR_LTD_CC RHS hack ([7b0767]);
`bs` (begin space) hack no longer needed either
2026-04-21 22:02:04 +01:00
gitlost 8a76981200 testcommon: need <sys/wait.h> for WIFEXITED/WEXITSTATUS
CI: try Qt6 for mac; checkout@v4 -> v6
2026-04-18 23:43:18 +01:00
gitlost 7b076717f2 DATAMATRIX: add manual FNC1 support
CODE128: error on unrecognized extra escape sequences instead of
  just passing them thru;
  fix possible shifting before manual FNC1 in 2nd position
  after single alpha (otherwise won't be recognized as AIM)
  fix not removing manual FNC1 in 1st/2nd position from content
  segs (as implied by symbology identifier)
CLI: warn if both "--dmre" and "--square" given (as "--square"
  overwrites "--dmre")
common: new routines `z_isalpha()`, `z_extra_escapes()` and
  `z_ct_set_seg_extra_escapes_eci()`
library: new helper `supports_extra_escape_mode()`;
  fix some error_number dups
BWIPP: update to latest, and allow for removal of DBAR_LTD_CC RHS
  quiet zones & extra row when have add-on in EAN/UPC composites
test suite: fix BWIPP escaping
manual/man/tcl: update for DATAMATRIX manual FNC1 support
Windows: resource scripts: make more consistent (libzint, CLI, GUI)
win32/README: update with MSVC 2026
2026-04-18 22:55:52 +01:00
gitlost f9a493522f DATAMATRIX: add new options DM_B256_START and DM_C40_START to
`options_3`, allowing forcing of Base 256 or C40 mode a la BWIPP
  for initial no. of characters specified in `option_1`, with 0
  meaning all (CLI "--dmb256=" and "--dmc40=", GUI also (apart
  from MAILMARK_2D, which may be added later);
  export masks `DM_B256_C40_START_MASK` & `DM_SQUARE_DMRE_MASK` in
  "zint.h"
ZBarcode_Encode_File: report filename (possibly truncated) in error
  message on failed open
GUI: uniquify some accelerators and add some child widget getter
  helpers to "mainwindow.cpp"
backend/DEVELOPER -> backend/README, with some expansion
debian/copyright: a few more fixes
BWIPP/pandoc: update to latest
tests/fuzz: adjust for new DATAMATRIX options
2026-03-30 21:25:22 +01:00
gitlost 3c193d7306 raster/vector: EAN/UPC: fix calculation of image/vector height to
allow for heights smaller than `textoffset` when have add-on
  (buffer overflow for raster, outside vector height for vector)
raster: EAN/UPC: make sure don't overwrite add-on stuff when
  line-copying guard descenders by limiting copy width
ZBarcode_Encode_Segs: allow for multiple (stacked) rows when
  setting absolute minimum height;
  state stacked symbols max in error message
DBAR_EXP: check length on encoding method 6 before trying to parse
  3-digit currency string with `z_to_int()`
CLI: stop looping over data args when have error;
  suppress taint warning by using fixed `malloc()` size for
  `arg_opts` instead of `argc`
general: use `vsnprintf()` instead of `vsprintf()` if not C89
ULTRACODE: don't call `ult_generate_codewords()` if `length` 0
  from fragment processing (avoids `assert()`)
clang-tidy -> 23 & suppress some warnings
test suite: fuzz: leave Z_FUZZ_DEBUG to compiler, fix comment
general: some minor code-formatting on touched files
README.deb -> README.debian (avoid confusion with actual ".deb")
BWIPP: update to latest
2026-03-26 17:35:13 +00:00
gitlost 56fca5b2a1 raster/vector: fix BARCODE_BIND_TOP trumping BARCODE_BOX
backend/tests/fuzz: update "fuzz.h" to take `option_3` min/max;
  update `INPUT_MODE_MASK` & `OUTPUT_OPTIONS_MASK`;
  set `height`, `border_width` & `output_options` from input
  (removing `Z_FUZZ_SET_OUTPUT_OPTIONS` conditional) and call
  `ZBarcode_Encode_and_Print()` instead of `ZBarcode_Encode()`;
  support standalone builds of "fuzz_data" & "fuzz_gs1" with
  `Z_FUZZ_MAIN_READ_ARGV_1` macro;
  update "fuzz_gs1" & "fuzz_gs1.dict" to better test caret/raw
  modes;
  gen_corpora: add `output_options`, `height` & `border_width` &
  find (3rd) from fuzz_data of BIND_TOP | BIND_BOX bug
2026-03-22 15:05:53 +00:00
gitlost f6174cba04 raster/vector: allow for separator height being > twice row height
(ticket #353, props Simon Resch)
2026-03-19 17:52:12 +00:00
gitlost d7b0daae5b debian/copyright: some more missing attributions 2026-03-19 13:01:30 +00:00
gitlost a9eef19aae pdf417.h/pdf417_tab.h: remove Copyright (C) 2004 Grandzebu and fix
and expand comments
debian/copyright: add some missing attributions
2026-03-18 23:27:51 +00:00
gitlost df64a0f237 debian: updated using https://salsa.debian.org/debian/zint as
template, props Dmitry Smirnov (ticket #147, props John Crisp);
  TODO: enable building with the GS1 Syntax Engine;
  this involved auditing copyrights which prompted the next item
  re "tif.c" and will prompt the next next item "pdf417.c"
tif.c: replaced LZW compression with tree-based one due to
  "tif_lzw.h"'s original BSD-TAHOE license which has the equivalent
  of the "advertising clause", new implementation (which is much
  faster anyway) props Harald Kuhr and Bob Montgomery
pdf417.c: TODO: Replace all code adapted from "pdf417.frm" as it
  was released under GPL v2.0 or later
pdf417.h: replace unnecessary "pdf417.frm" references with ISO/IEC
  standard as 1st step re above, some expanded comments
general: Codablock-F -> Codablock F (i.e. lose hyphen)
cmake: frontend/frontend_qt: go back to only setting RPATH on macOS
  as not Debian compatible and it seems it's not a good idea on
  Linux anyway; TODO: check BSD + other Unixes
CLI/GUI: make "--verbose" option official and document
tools/gen_eci_sb_h.php/gen_eci_mb_h.php: add SPDX Unicode-3.0;
  update haible.de/bruno tarball info - "GB18030.TXT" no longer in
  "jdk-1.4.2/" so mention "libiconv-1.11/" version instead (same)
general: add various SPDXs and normalize some Copyrights
reedsol.c: malloced `logt`/`alog` tables int -> short (slight
  performance improvement)
aztec.c: add copyrights, some code fiddling
BWIPP: update to latest
2026-03-18 15:08:32 +00:00
gitlost db03f0b304 gs1_lint_parse_raw_caret: check that data of AIs with non-predefined
lengths are terminated with separators (unless last)
  (ticket #352, props Simon Resch)
2026-03-18 14:24:40 +00:00
gitlost b3a3c0d3b4 AZTEC: use algorithm adapted from ZXing for optimized encodation
(ticket #347), props Frank Yellin and Rustam Abdullaev;
   also improve performance of `FAST_MODE`
DATAMATRIX: assert max size on `edges` will fit in unsigned short;
   use MASK for DMRE/SQUARE `option_3` setting
PDF417: assert max size on `edges` will fit in unsigned short
GUI: fix setting AZTEC size and ECC combos if not previously set
manual: fix not mentioning AZTEC re `FAST_MODE`;
  gs1 mode footnote: mention 3940's length; pandoc -> 3.9
test suite: DOTCODE: account for new BWIPP input length guard
2026-03-11 15:48:24 +00:00
gitlost ee71a5cc56 manual: clarify API GS1 flags require GS1_MODE 2026-02-26 22:56:04 +00:00
gitlost 6dd216db85 Fix some typos; add _typos.toml 2026-02-26 22:35:25 +00:00
gitlost bd33953fc1 general: add -Wshorten-64-to-32 compiler flag & suppress warnings
(ticket #351, props Axel Waggershauser)
2026-02-26 18:23:21 +00:00
gitlost 9ef5bc7298 GS1SE: fix bug in allowing initial GSs in GS1RAW_MODE in composites 2026-02-26 16:34:59 +00:00
gitlost 0a8a79fa6c GS1: new GS1RAW_MODE (CLI "--gs1raw") and GS1 Syntax Engine
"Unbracketed AI" (caret) options for specifying GS1 input
  (ticket #350, props Mario Verbruggen)
DBAR_EXP_CC/DBAR_EXPSTK_CC: fix separator over finder patterns
  when linear part is greater than 4 codeblocks
general: left-over raw_text -> content_segs in comments;
  update & expand some GS1 General Specs refs;
  some minor code fiddling
test suite: suppress some additional ZINT_SANITIZEM false positives
  (& add new ZINT_TESTUTIL_SANITIZEM_INIT helpers)
2026-02-26 15:05:45 +00:00
gitlost 3b24d129d7 CODE32/PZN: fix not restoring option_2 (props axxel) 2026-02-05 02:39:04 +00:00