DBAR_OMN/DBAR_LTD/DBAR_STK/DBAR_OMNSTK: prefix raw_segs with

implicit "01" prefix (see ZXing-C++ issue 883);
  allow and ignore prefixes "01", "[01]" and "(01)" if check digit
  given (ticket #333, props Axel Waggershauser);
CODE128/PDF417: suppress some clang-tidy-20.1 warnings
general: add `ZUCP()`, `ZCUCP()`, `ZCCP()` macro shorthands to
  cast away char pointer signedness
This commit is contained in:
gitlost 2025-04-05 00:19:13 +01:00
parent 01c9b82504
commit 789e049945
7 changed files with 182 additions and 129 deletions

View file

@ -143,8 +143,11 @@ typedef unsigned __int64 uint64_t;
#define z_isascii(c) (((c) & 0x7F) == (c))
#define z_iscntrl(c) (z_isascii(c) && ((c) < 32 || (c) == 127))
/* Helper to cast away char pointer signedness */
#define ustrlen(source) strlen((const char *) (source))
/* Shorthands to cast away char pointer signedness */
#define ZUCP(p) ((unsigned char *) (p))
#define ZCUCP(p) ((const unsigned char *) (p))
#define ZCCP(p) ((const char *) (p))
#define ustrlen(p) strlen(ZCCP(p))
/* Converts an integer value to its value + '0' (so >= 10 becomes ':', ';' etc) */
#define itoc(i) ((i) + '0')