Commit graph

26 commits

Author SHA1 Message Date
gitlost
93c3e27fba CODE128: Add minimal encodation algorithm (non-extended ASCII only)
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
2024-09-07 12:44:16 +01:00
gitlost
3cb724253b Add fuzz stuff ("backend/tests/fuzz"), including OSS-Fuzz
"Dockerfile" etc
PDF417: lessen some debug verbosity
gif: use "gif_" prefix; some code fiddling
2024-01-04 20:11:04 +00:00
gitlost
a14fe77aa0 EANX_CC/UPCA_CC: fix crash in dbar_date() on not checking length
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
2023-11-27 12:55:53 +00:00
gitlost
e515f63fab - PDF417/MICROPDF417: use latch not ps shift for padding when
spanning Text segments to avoid affecting 1st char of 2nd segment
- PDF417/MICROPDF417: add optimized encoding, FAST_MODE for
  previous scheme; formatting changes
- common.c/h: add `cnt_digits()`, comments in include and make more
  consistent, minor code fiddling
- DOTCODE: replace `dc_n_digits()` with new `cnt_digits()`
- test_qr: fix `test_qr_perf()`
- composite: minor code fiddling
- library: debug dump HIBC-processed input
- BWIPP: update to latest
2022-11-06 22:25:19 +00:00
gitlost
e1522e0808 backend: non-functional code-fiddling: format codablock.c (clang-format
+ manual); add SPDX to all files; prefix include guards with Z_;
  move vim comment to bottom; remove some trailing spaces
2022-09-13 21:16:31 +01:00
Jeff Skaistis
e8a125a2e1 PDF417 enhancements:
- Switched mode selection to better optimized method listed in Appendix D of the AIM PDF417 specification.
- Removed extraneous text latch after a byte shift.
- Removed invalid numeric->byte shift transitions.
2022-08-10 13:40:40 -05:00
gitlost
f58c80e290 Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
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
2022-05-09 19:50:50 +01:00
gitlost
4e72a541f7 PDF417: fix cols/rows calculation to require multiple <= 928 codewords;
add specify rows option (option_3) (#204);
  warn if cols increased from specified (back-incompatible);
  move table definitions from "pdf417.h" to new "pdf417_tabs.h" and
  make INTERNAL_DATA and share with composite.c (saves ~10K);
  prefix routines and tables with "pdf_";
  some small performance improvements through if/elses, pdf_textprocess()
  & pdf_numbprocess() loop simplifications
MICROQR: fix debug access crash on printing non-NUL-terminating binary
DATAMATRIX: fix missing ++ from "[tp]" at C40/TEXT EOD processing of GS1
  (though probably never reached); use "[tp++]" throughout
Add const to static tables missing it and also to some variables
Change "debug" -> "debug_print" throughout
2021-10-30 22:00:31 +01:00
gitlost
c0791ad85e Add Structured Append support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, MAXICODE, MICROPDF417, PDF417, QRCODE, ULTRA
DOTCODE: use pre-calculated generator poly coeffs in Reed-Solomon for
  performance improvement
PDF417/MICROPDF417: use common routine pdf417_initial()
GUI: code lines <= 118, shorthand widget_obj(),
  shorten calling upcean_addon_gap(), upcean_guard_descent()
various backend: var name debug -> debug_print
2021-09-28 21:42:44 +01:00
gitlost
14d1140d09 CODABLOCKF: prevent cols > 62; fix pTestList buffer overflow
RMQR: update to new draft ISO/IEC JTC1/SC31N000 (Draft 2019-6-24);
  allow for righthand vertical timing pattern in populate_grid()
ULTRA: update max size and min cols based on BWIPP 2021-07-14 update
backend_tcl/zint_tcl.dsp: use /MD instead of /MT for tcl lib compat;
  change include/lib path to more standard one
manual.txt: highlight that rMQR is still in development
GUI: use cross-platform smaller font func instead of explicit values for notes
2021-08-10 12:04:25 +01:00
gitlost
44923349f3 PDF417/raster: performance large data; common.h inline, module_colour_is_set(); #209 2020-11-01 18:32:55 +00:00
gitlost
74ad80976e PDF417TRUNC: stop pattern; PDF417: no default mode codeword 900 if 1st 2020-07-17 16:39:01 +01:00
Rodrigo Torres
4963a772db Refactor 2017-09-11 19:21:33 +01:00
Robin Stuart
1ca01e9322 Make data types for tables consistent across symbologies
..and reduce library binary size slightly
2017-08-09 09:13:37 +01:00
Robin Stuart
17be0440cc Review of data types to reduce memory usage (no change of functionality) 2017-06-10 10:08:27 +01:00
Robin Stuart
3f7f909644 Simplify PDF binary handling, remove TTF array (no change of functionality) 2017-06-09 22:00:22 +01:00
Robin Stuart
8a88ffdd7b Code format and audit, part 2
Update copyright info, remove unused code, etc.
2016-02-20 10:50:15 +00:00
oxygenic
1a7863520b license changed with permission of original copyright holders (see mailing list for details) 2013-05-16 19:26:38 +02:00
openapc
bf2dbe7494 code reworked 2012-12-29 19:37:03 +01:00
hooper114
04b9a99241 API overhaul part 1: removal of nullchar 2009-09-29 09:45:46 +00:00
hooper114
d6df698918 NULL character support 2009-01-02 21:09:16 +00:00
hooper114
88cc19bab1 Change of e-mail address 2008-11-17 08:47:42 +00:00
taipanromania
b1b43da367 warnings -- 2008-10-03 09:26:27 +00:00
hooper114
5b10d056c2 Reduced warnings about signedness 2008-09-30 15:05:53 +00:00
taipanromania
244381770b PDF_MAX --> option_3 2008-07-18 14:42:08 +00:00
factor
52aa6fdb27 Initial revision 2008-07-13 21:15:55 +00:00