gitlost
206ae26d20
ULTRA: add revision 2 support (based on BWIPP 2021-09-28 update)
...
GUI: DMATRIX: disable DMRE if SQUARE checked; ULTRA: Size/Ecc buttongroup
2021-09-29 16:25:59 +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
eb6e5daa2d
raster.c: need ceilf(large_bar_height * si) to avoid zero height rows;
...
also improve non-half-int interpolation performance
raster/vector.c: use new stripf() func in "common.c" to workaround gcc
32-bit float calculation variations
gs1.c: allow dummy AI "[]" if GS1NOCHECK_MODE and has data (#204 );
also add note re TPX AI 235 and terminating FNC1
Remove trailing whitespace in various files
2021-09-26 23:55:16 +01:00
gitlost
9884875fd5
GUI: fix dot size label position
2021-09-25 14:44:32 +01:00
gitlost
4284f3c578
Add output_options BARCODE_QUIET_ZONES and BARCODE_NO_QUIET_ZONES
2021-09-24 13:21:24 +01:00
gitlost
4009c86c5f
UPC/EAN: Add guard_bar descent (guard_descent)
...
zint.h: Adjust field order to improve alignments; encoded_data 143 -> 144
2021-09-22 00:04:15 +01:00
gitlost
9bae0b86f9
- raster.c: Need ceilf(symbol->height * si) to avoid heap-buffer-overflow;
...
also avoid distributive multiplication with floats to lessen chances of
platform variation (#204 ARM-Cortex crash)
- raster.c: Don't allow for text if scale < 1.0
- raster.c: Cast some indexes to (size_t) to allow for large scale
- vector.c: Check malloc()s and return ZINT_ERROR_MEMORY on fail
- raster/vector.c: various var name changes & other code fiddling
- library.c: Check that scale/height/whitespace/border are reasonable values:
scale (0.01-100), height (0-500), whitespace_width/height (0-100),
border_width (0-100)
- CLI: allow both e.g. '-height' and '--height' (getopt_long_only())
- gif.c: fix GIF_ZLW_PAGE_SIZE -> GIF_LZW_PAGE_SIZE
- GUI: allow whitespace/scale to 100
2021-09-20 14:56:27 +01:00
gitlost
5766b39845
gif.c: use malloc instead of alloca for LZW buffer as fails for large scale
2021-09-18 17:15:16 +01:00
gitlost
bd06400a5b
CODE93: add option_2 = 1 to display check chars in HRT
2021-09-13 18:49:25 +01:00
gitlost
86c15741d8
gs1.c: Allow 0-length AI data if GS1NOCHECK_MODE, props codemonkey82 ( #204 )
2021-09-13 17:54:46 +01:00
gitlost
f84f82d9a2
GUI: Separate out SCM fields for MAXICODE (Ticket #212 )
...
vector.c: Enforce minimum scale 0.1 and allow down to 0.1 in GUI
2021-09-09 21:50:02 +01:00
gitlost
c4b7921819
library.c: error_tag(): check error_number < ZINT_ERROR on WARN_FAIL_ALL
2021-08-31 18:34:29 +01:00
gitlost
603f5931de
CODE93: don't display check characters in HRT (as per standard Figure B1)
2021-08-28 20:17:26 +01:00
gitlost
b568201574
MICROQR: some debug output, test case for ticket #241
2021-08-26 17:49:05 +01:00
gitlost
3388f98c00
vector: Add width to struct zint_vector_circle & use for MaxiCode bullseye
...
**Incompatible change**
2021-08-22 13:59:01 +01:00
gitlost
67b2a9c99d
RMQR: add ECI support; GUI/CLI: fix dev version test
2021-08-20 16:50:39 +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
4d0fff7cf5
Changelog: update
2021-08-05 18:24:51 +01:00
gitlost
b015e38da0
composite: fix buffer overflow for large linear, small composite (500 -> 1000)
...
composite: clear errtxt when bumping from CC-A -> CC-B -> CC-C
composite: CC-C adjustment 53 -> 52 (same as BWIPP) with proper explanation
composite: remove unneeded > 11805 length check
CODEONE: remove unneeded extended ASCII check in C40 count
GS1_128/CODE16K: remove unneeded initial GS1 mode '[' check
PDF417: remove unneeded second option_2 > 30 check
Document some "Not reached" lines (code coverage)
Update bwipp_dump.ps
GUI: window/tab height +5 so 2 full lines for composite edit box (Ubuntu)
manual: dash -> hyphen, PDF417 "check digit" -> "error correction", DMRE ref
tests: further test cases for CODEONE/CODE16K/common/composite/DATAMATRIX/
DOTCODE/gs1/MAXICODE/PDF417/postal/QRCODE
2021-08-05 16:34:45 +01:00
gitlost
3f33ed3eb9
CMakeLists.txt: cmake min required 3.13 -> 3.5 using CMAKE_REQUIRED_LIBRARIES; add ZINT_COVERAGE option
...
bmp/emf/ps.c: allow for foreground colour in ULTRA
bmp/gif/pcx.c: allow for BARCODE_STDOUT (fflush/fclose)
emf.c: hexagon rotation field not used; dont't use float index in font loop; Windows stdout binary mode
png.c: remove unused 8-bit; simplify libpng error handling and fclose outfile on error
ps.c: fix buffer overflow on colour_to_pscolor() CMYK
tif.c: fix BLACKISZERO indexes
CODE39: simplify check digit setting
reedsol.c: rs_uint_init_gf() log/alog tables must be zeroed
ZBarcode_Encode: debug: fix access out-of-bounds on non-NUL-terminated source if length < 10
manual.txt/zint.h: document NUL-terminated strings
tests: cover further cases for output (bmp/emf/etc), eci/gb18030/gb2312/sjis, reedsol, AZTEC, CODE39
2021-07-26 15:29:05 +01:00
b'Git Lost
059abdf6a1
Merge /u/gitlost/zint/ branch gs1_nocheck_mode into master
...
https://sourceforge.net/p/zint/code/merge-requests/128/
2021-07-20 09:08:25 +00:00
gitlost
141cc0b866
cmake min 3.9 -> 3.13 so LINK_LIBRARIES available in try_compile()
...
cmake: hardcode -fsanitize=address for MSVC 2019
cmake: non-MSVC simplify setting sanitize address, undefined
test_code128: test_hibc_input: extra tests
2021-07-19 15:58:44 +01:00
gitlost
ef6e1ca1e3
POSTNET/PLANET: allow up to 38 chars (ZINT_WARN_NONCOMPLIANT) (see [d7ac9c])
2021-07-13 19:56:53 +01:00
gitlost
2e84fd5157
Replace WARN_ZPL_COMPAT with GS1NOCHECK_MODE
2021-07-13 17:39:03 +01:00
gitlost
7cc2095d3c
UPCE/UPCE_CC: allow check digit (same as UPCA/UPCA_CC) so selecting composite doesn't give error
...
composite.c: warning wasn't been passed back
zint.h/library.c: add const to char pointer args; move func defs around a bit
2021-07-12 22:27:16 +01:00
gitlost
d7d787383e
backend/tests/CMakeLists.txt: cmake min 3.18 -> 3.9, bwipp_dump.ps tar ( #235 )
2021-07-08 12:08:59 +01:00
gitlost
4d9aa96453
testUtilDataPath: use CMAKE_CURRENT_SOURCE_DIR env to work out-of-tree ( #234 )
2021-07-07 14:47:25 +01:00
gitlost
7379acd4a4
backend/tests/CMakeLists.txt: fix bwipp_dump.ps tar ( #235 ), props Alonso Schaich, Andre Maute
2021-07-07 14:42:16 +01:00
gitlost
f03da2f4ba
CODE128: suppress cppcheck out-of-bounds warning; plus others ( #233 )
2021-07-07 13:58:04 +01:00
gitlost
3c1869b032
library: compat symbology 39 fix; ISBN: "X" check
...
WARN_FAIL_ALL: always return error: ZINT_ERROR_USES_ECI/NON_COMPLIANT
Fuller error messages; more comments zint.h
mainwindow.cpp: replace metaobject ENUM with array
(suppresses virtual in constructor warning)
2021-07-06 19:53:31 +01:00
gitlost
4d3aae45d0
testcommon: fix sizeof bug; AZTEC/QR: suppress cppcheck warnings ( #233 )
2021-07-06 12:13:34 +01:00
gitlost
9b02cd5221
CODEONE: is_last_single_ascii() out-of-bounds sp + 1, #232 CI-Fuzz, props Jan Schrewe
2021-07-05 11:52:43 +01:00
gitlost
bcf6eff93c
testUtilDataPath: fix running from build subdir ( #230 )
2021-07-02 16:13:48 +01:00
gitlost
a312cd8e8e
raster/output: use new isfintf() to test floats integral (CodeQL)
2021-06-30 11:57:21 +01:00
gitlost
37fac73cb1
DATAMATRIX/CODEONE: Use LCM in look ahead tests to avoid floats ( #228 )
2021-06-29 22:02:24 +01:00
gitlost
368633bda4
malloc/calloc: check for NULL always (11.1.0 gcc -fanalyzer -c backend/*.c)
...
ZBarcode_Encode: don't reinit symbol->outfile, props Alonso Schaich
frontend/test_args: skip long filename tests on Windows, props Alonso Schaich
2021-06-29 15:43:42 +01:00
gitlost
52c00e59ba
C25/DBAR: use new func gs1_check_digit() for common GS1 check digit calc
...
CODE11/CODE39/EXCODE39/CODE93/PZN/CHANNEL/VIN/DBAR/UPCEAN: fuller error messages
DATAMATRIX: look_ahead_test debug counts
DBAR: consolidate option_2 cols_per_row
CMakeLists.txt: restore -fno-var-tracking-assignments for gcc no DEBUG
overall: suppress various warnings on various configs
testcommon.c: clean-up
2021-06-27 11:47:55 +01:00
gitlost
70801d8932
tests: VC6 compatible; plot_raster_dotty: avoid float rounding difference
2021-06-23 15:00:49 +01:00
gitlost
c693482aa1
Change height and row_height array to floats; DAFT tracker ratio
2021-06-19 13:11:23 +01:00
gitlost
22a6c583af
test_raster/vector: add height test in prep for float height MR; AZTEC: suppress clang-tidy warning
2021-06-18 01:03:33 +01:00
gitlost
21a4e2c1f6
data file tests: fix [32af28] generate data directory test
2021-06-16 17:56:32 +01:00
gitlost
32af280254
testcommon: add testUtilDataPath() (uses getcwd()) so generate works for data files, remove copy
2021-06-14 00:48:29 +01:00
gitlost
8ff15d805a
CODABAR: fix [69c1b4] errtxt; CLI: _WIN32, fuller error messages; win32/README: Administrat-or
2021-06-12 16:01:16 +01:00
gitlost
69c1b4cbf0
CODABAR: better error messages; win32/README, zint_cmdline_vc6/readme.txt: fixes
2021-06-10 18:04:27 +01:00
gitlost
ede1234b8f
Re MR #121 calcium -> static; reinstate STATIC_UNLESS_ZINT_TEST error_tag/strip_bom; whitespace
2021-06-10 16:20:14 +01:00
Schaich
43d7493cf2
Remove unused variable
2021-06-10 22:46:10 +09:00
Schaich
dce51ceb6d
Use "human readable" file mode
2021-06-10 21:01:34 +09:00
Schaich
afea0ad2c3
Get test_library compiled on windows
...
test_file_unreadable cannot be implemented easily, as files are always
readable by their owner on windows. While `_chmod` is available in the POSIX
compatibility function set, it cannot be used to take away read permissions,
either.
While here, move functional code out of any assert statements. It shall be
executed even when the assertions are disabled
2021-06-10 21:00:42 +09:00
gitlost
4a8cac2a5a
CODEONE/DATAMATRIX/MAILMARK/PLESSEY: fix some 32-bit/portability bugs
...
PLESSEY: add options NCR weighted mod-10, hide check digit(s) in HRT
test suite: now runnable under MSVC 2019, 2017, 2015, MinGW/MSYS
win32/README: update with MSVC 2019 and CMake instructions
2021-06-10 11:15:39 +01:00
Schaich
2221cb1e83
Fix "most" compilation issues MSVC has
...
test_library is still broken
2021-06-02 21:14:14 +09:00
Schaich
88bbeb862b
Move getopt out of the frontend, because it's used in the backend's test, too
2021-06-02 21:14:14 +09:00
Schaich
779a318c93
The testRun function uses getopt(), which is troublesome because the bundled implementation is part of the front-end
2021-06-02 21:14:14 +09:00
Schaich
3114a6697b
Factor out the zint_add_test macro
2021-06-02 21:14:14 +09:00
Schaich
9ff3f13c19
Optionalize the PNG and the Qt dependencies
...
Expose the ability to turn these dependencies off, which results in reduced
functionality. However, it enables a developer using the zint library to
instruct cmake to build a libzint as deployed by e.g. build servers which
don't have png/zint installed, without having to uninstall those libraries
from the development system
2021-06-02 21:14:14 +09:00
Schaich
fd656358a3
Add zint-test's testcommon include directory to consumers of the library
2021-06-02 21:14:14 +09:00
Schaich
3f7356e262
Adapt the README
2021-06-02 21:14:14 +09:00
Schaich
eabaf54d74
Test both the dynamic and the static library
2021-06-02 21:14:14 +09:00
Schaich
e5cd0e4ee8
Remove superfluous commas
...
CMake separates by spaces, not commas. Remove the commas from the strings
2021-06-02 21:14:14 +09:00
Schaich
6de8fe1c62
Move only downwards in the filesystem hierarchy
...
This will pick up the local copies of the test data by default, without
needing to create a subdirectory in the backend/tests path and executing
the tests from there. The Current Working Directory can be set if this
proves to be insufficient
2021-06-02 21:14:14 +09:00
Schaich
98cd7b231f
Copy the test data into the build directory (just in case)
2021-06-02 21:14:14 +09:00
Schaich
c84915e212
Linking the tests against zint-static if available
...
Linking against the dynamic zint library requires LD_LIBRARY_PATH and friends
to be set, which complicates the test setup. On the long run, we want to be
able to test both the dynamic and the static (at the same time), though
2021-06-02 21:14:14 +09:00
Schaich
3e89058051
Turn zint tests into a subproject of backend
...
All dependency handling is implied via linking to the zint target. Options
are inherited from the backend build
2021-06-02 21:14:14 +09:00
gitlost
9b63e2ae22
DOTCODE: allow for max 200 cols in CLI, GUI, Tcl; more detailed size error messages
2021-05-28 15:05:06 +01:00
gitlost
dfb9345b75
png: ULTRA: allow for fgcolour if bind/box, bug introduced by [ed3cc5] (MR #111 )
2021-05-28 14:37:57 +01:00
gitlost
0337548c77
AZTEC: optimize populate_map (good for small data)
2021-05-27 18:33:19 +01:00
gitlost
00e8cb0904
Add whitespace_height to zint_symbol (vertical whitespace)
2021-05-25 20:42:26 +01:00
gitlost
f3a94f0c0c
C25STANDARD/C25INTER/C25IATA/C25LOGIC/C25IND: add check digit option ( #216 )
2021-05-17 20:04:00 +01:00
gitlost
29d761c795
MAXICODE: Rejig raster output to more closely match ISO 16023:2000
2021-05-16 16:34:42 +01:00
gitlost
79d3c1dc7a
Add GS1PARENS_MODE (input_mode) to allow inputting GS1 AIs in parentheses
2021-05-15 12:23:46 +01:00
gitlost
6fb0d077bc
EAN14, NVE18: fix checksum calc for zero-filled input
2021-05-14 16:04:34 +01:00
gitlost
d9e8ae582d
tests: small additions for AZTEC READER_INIT, PDF417, Big5
2021-04-20 11:49:14 +01:00
gitlost
5187f2226d
MAXICODE: fix shifting from sets C/D/E to A/B (only latch available)
2021-03-28 21:31:45 +01:00
gitlost
6dc8a242df
test_tif: fix, use tiffinfo if available (big speedup)
2021-03-21 21:20:16 +00:00
gitlost
2d962c6321
get_best_eci: check UTF-8 before returning 26; move is_valid_utf8 to common
2021-03-21 17:35:52 +00:00
gitlost
7f74414666
eci.c: fix bad bug in Korean, return EUC-KR instead of raw KS X 1001
2021-03-20 14:36:21 +00:00
gitlost
2c053c325a
tif.c: Use palette/bilevel/LZW to reduce file size, alpha/CMYK support
2021-03-19 13:09:21 +00:00
gitlost
badd9e59ad
Fix UPCEAN small font ignored/disabled (introduced [1adba1])
2021-03-19 00:12:13 +00:00
gitlost
4e501c77da
MAXICODE: fix mask typos for ECI 3/4 bytes
2021-03-18 16:21:22 +00:00
gitlost
14f67331c2
#223 Use cmake options to interface command line parameters, props Schaich Alonso
2021-03-16 23:38:47 +00:00
gitlost
7a7210cfa1
testcommon.c: Suppress unused args warning in testUtilCmpPngs if NO_PNG
2021-03-08 13:14:38 +00:00
gitlost
d81b5db271
#220 backend/tests cmake: Use PNG::PNG for libpng (cf #213 ), props Schaich Alonso
2021-03-08 12:34:34 +00:00
gitlost
6b7b5109b9
png.c: fix 4-bit odd bitmap width bug introduced by [ed3cc5] (MR #111 )
2021-03-05 17:27:11 +00:00
gitlost
ed3cc51a46
png.c: Use palette for file size savings
2021-02-26 20:45:08 +00:00
gitlost
7f8c8114f3
#218 Prevent buffer overflow in ean_leading_zeroes by checking max lengths
2021-02-25 17:14:49 +00:00
gitlost
88d1a9f625
DATAMATRIX: make EOD encodation strictly ISO 16022 compliant
2021-02-23 00:01:15 +00:00
gitlost
63053c4c0f
Update gs1_lint.h re initial index in gs1-format-spec.txt
2021-02-22 19:05:24 +00:00
gitlost
9d023a806a
Update gen_gs1_lint.php, gs1_lint.h re new # Data title in gs1-format-spec.txt
2021-02-20 17:50:06 +00:00
gitlost
ebcd0a0d6d
#209 large.c fix oversized arrays by 0-filling; const args, casts
2021-02-11 13:51:07 +00:00
gitlost
a91933cbdd
gs1_verify: GMN (8013) update (gs1-format-spec.txt), X..25, csumalpha
2021-02-08 02:45:11 +00:00
gitlost
6274140c73
CODEONE: various fixes, ECI support; #209
2021-02-05 23:55:24 +00:00
gitlost
538efd6e52
gs1_verify: 4308 no pcenc (gs1-format-spec.txt); GS1 General Spec 21.0.1
2021-01-28 23:41:54 +00:00
gitlost
f6bed3acb2
DOTCODE: Fix best_mask -> high_score prime test; manual mask
2021-01-22 18:07:59 +00:00
gitlost
484bd6e19a
CLI: Handle UTF-8 args on Windows; -b <barcode name>
2021-01-20 21:15:03 +00:00
gitlost
4efbd46f86
gs1_verify: update bwipp_dump
2021-01-19 17:58:22 +00:00
gitlost
f9300cb37e
gs1_verify: validate AIs from BWIPP gs1-format-spec.txt
2021-01-18 20:10:52 +00:00
gitlost
0b80592f87
escape_char_process: "\xNN" simple convert (reverts [dddf29]), "\uNNNN" BMP check
2021-01-15 14:22:32 +00:00
gitlost
b999c11414
library: strip_bom: copy NUL; error_tag: defensively truncate, return error
2021-01-12 19:51:54 +00:00
gitlost
e1e0aa7ac4
eci: All ECIs: update CLI main.c and tcl zint.c
2021-01-12 14:11:53 +00:00
gitlost
7fe930b4dc
eci: Add support for all ECIs (Big5, Korean, UCS-2BE)
2021-01-11 18:11:41 +00:00
gitlost
f62a678d0f
#209 suppress CodeQL warnings except CODEONE; simplifications AZTEC_RUNE, MICROPDF417
2020-12-23 10:57:24 +00:00