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
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 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
- use fixed-length string tables (mostly) instead of (char *) pointer ones
(saves ~40K)
- re-use C128Table for CODABLOCKF and CODE16K
(required removal of Stop character and extra CODE16K-only entry)
- use pointer to destination and copy (memcpy/strcpy(), bin_append_posn())
instead of concatenating (strcat()) (mostly)
- replace last remaining bin_append()s with bin_append_posn();
bin_append() removed
- add length arg to toupper() and expand() (avoids strlen())
- change is_sane() to use table-based flags (avoids an iteration)
- rename lookup() to is_sane_lookup() and change to check and return posns
and use in pointer to destination loops (avoids strcat()s)
- remove special case PHARMA in expand() (dealt with in pharma())
- make #define SILVER/CALCIUM/TECHNETIUM/KRSET etc static strings
- replace strchr() -> posn()
- CODE128: populate destination once in checksum loop; re-use and export
some more routines (c128_set_a/b/c(), c128_put_in_set()) for sharing;
prefix defines (SHIFTA -> C128_SHIFTA etc) and existing exported routines
- use factor XOR toggle trick in checksum calcs (avoids branch)
- raster.c: fill out single 1-pixel row and copy using new draw_bar_line(),
copy_bar_line() routines; similarly in buffer_plot compare previous line &
copy if same (same technique as used to improve non-half-integer scaling,
significant performance increase, (c) codemonkey82);
also done for PNG (BMP/GIF/PCX/TIFF not done)
- raster/vector/output.c: shorten "output_" prefix -> "out_";
sync vector to other raster changes to try to keep source files similar
- 2of5.c: prefix "c25_"
JAPANPOST: return error if input data truncated (backward incompatible)
DAFT: max chars 50 -> 100
common.c: istwodigit() -> is_twodigit()
common.c/emf.c/output.c: use some further stripf()s (MSVC6 float variations)
library.c: new check_output_args() helper
zint.h: add BARCODE_LAST marker and use in library.c
QRCODE: remove a NOLINT (requires clang-tidy-13), one remaining
CMake: separate no-optimize from ZINT_DEBUG into new ZINT_NOOPT option
Rename barcode funcs to same as BARCODE_XXX name
library: barcode funcs array for dispatch, used for ZBarcode_ValidID() also
general: change is_sane() comparison to nonzero from ZINT_ERROR_INVALID_OPTION
MAILMARK: fuller error messages
CODABAR: add option to show check character in HRT
zint.h: use 0xNNNN for OR-able defines
GUI: add guard descent height reset button, add Zint version to window title,
static get_zint_version() method, use QStringLiteral (QSL shorthand),
use SIGNAL(toggled()), add errtxt "popup" and status bar, add icons,
add saveAs shortcut, add main menu, context menus and actions, add help,
reset_view() -> reset_colours(), add copy to clipboard as EMF/GIF/PNG/TIF,
lessen triggering of update_preview(), shorten names of getters/setters,
simplify/shorten some update_preview() logic in switch,
CODEONE disable structapp for Version S
qzint.cpp: add on_errored signal, add missing getters, add test
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
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
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
In `aztec_text_process`, `binary_string`, which aliases to `aztec`'s
`bit_pattern` has it's first element set to NUL. However, when the string
is later written into using `bin_append_posn`, that NUL is overwritten and
further NUL to replace it is not appended.
In general, the garbage collected memory content should never be assumed to
have a specific value unless a value was explicitly assigned, so the content
of `bit_pattern` cannot be safely assumed to be NUL.
If the string is not NUL terminated, functions relying on NUL termination,
such as the printf call at the end of `aztec_text_proccess` itself,
will overrun the array bounds.
Explicitly initialize `bit_pattern`
Patch from Michael <virtual_worlds@gmx.de>
Full text: As usual I have modified only minor things to remove warnigs when compiled as C++ code, have added some const-specifiers where possible to help the compiler create more efficient code and added some static-specifiers to make functions invisible to other modules.