Commit graph

14 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
7246d67175 gs1/gs1_lint: update to latest gs1-syntax-dictionary, removing
`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)
2024-06-27 23:00:13 +01:00
gitlost
0a00d04ccc CMakeLists.txt: check against c not c++ (CheckCXX -> CheckC etc)
BMP/EMF/PCX/TIF: use more portable packed attribute instead of
  pragma if not MSVC
CHANNEL: pass ptr not struct to `channel_copy_precalc()`
2024-05-27 20:55:04 +01:00
gitlost
930f458979 backend: define z_alloca() and use for both Unix and Windows;
replace double-slash comments with old-skool slash asterisk ones;
  define uint16_t etc for Windows ourselves and remove ms_stdint.h &
  stdint_msvc.h as no longer used;
  (backend (excepting test suite) now C89 compatible)
LICENSE: move from backend to root and move COPYING to frontend, with
  copies in frontend_qt & backend_qt, so in where it applies;
  add LICENSE section from manual to root README
2022-07-14 16:01:30 +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
Robin Stuart
b5e27d3e0b Better compression for Ultracode in BMP
Also corrects colour shifting bug
File size is still bigger than it needs to be for Ultracode, but now uses 4bpp
2020-08-12 13:19:56 +01:00
Robin Stuart
37fccf1c03 Use 1 bit per pixel for BMP files (Except Ultracode)
Needs more work to reduce Ultracode file size too
2020-08-12 00:18:10 +01:00
Boris Zentner
31cc0ae78a Remove spaces before EOL 2017-10-25 17:23:57 +01:00
Robin Stuart
19ba8a34c4 Update to version 2.6.0 and update copyright to 2017 2017-05-11 21:14:38 +01:00
Robin Stuart
71a30a9031 pack structures in portable fashion, now creates valid bitmap headers for Windows 2016-09-10 18:35:45 +01:00
Robin Stuart
2c2200a7cb modifications for VS2015, some
additional static/const's and a few bugfixes for HanXin and DotStream.

Patch by Michael <virtual_worlds@gmx.de>
2016-09-05 22:06:50 +01:00
Harald Oehlmann
3939a1ae54 Make compile with MSVC6 (no C99 compatibility) 2016-07-28 10:32:46 +02:00
Robin Stuart
7e3a56815f Correct header info 2016-07-22 17:21:40 +01:00
Robin Stuart
75384ca009 Add bitmap (BMP) file support
And upgrade symbol->bitmap structure to reflect BMP format
Based on work by Adrian Keller
2016-07-18 20:14:56 +01:00