mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-14 10:03:54 +00:00
DATAMATRIX: add manual FNC1 support
CODE128: error on unrecognized extra escape sequences instead of just passing them thru; fix possible shifting before manual FNC1 in 2nd position after single alpha (otherwise won't be recognized as AIM) fix not removing manual FNC1 in 1st/2nd position from content segs (as implied by symbology identifier) CLI: warn if both "--dmre" and "--square" given (as "--square" overwrites "--dmre") common: new routines `z_isalpha()`, `z_extra_escapes()` and `z_ct_set_seg_extra_escapes_eci()` library: new helper `supports_extra_escape_mode()`; fix some error_number dups BWIPP: update to latest, and allow for removal of DBAR_LTD_CC RHS quiet zones & extra row when have add-on in EAN/UPC composites test suite: fix BWIPP escaping manual/man/tcl: update for DATAMATRIX manual FNC1 support Windows: resource scripts: make more consistent (libzint, CLI, GUI) win32/README: update with MSVC 2026
This commit is contained in:
@@ -140,6 +140,7 @@ typedef unsigned __int64 uint64_t;
|
||||
#define z_isdigit(ch) ((ch) <= '9' && (ch) >= '0')
|
||||
#define z_isupper(ch) ((ch) >= 'A' && (ch) <= 'Z')
|
||||
#define z_islower(ch) ((ch) >= 'a' && (ch) <= 'z')
|
||||
#define z_isalpha(ch) (z_isupper(ch) || z_islower(ch))
|
||||
#define z_isascii(ch) (!((ch) & ~0x7F))
|
||||
#define z_iscntrl(ch) (!((ch) & ~0x1F) || (ch) == 127)
|
||||
|
||||
@@ -307,6 +308,13 @@ INTERNAL int z_utf8_to_unicode(struct zint_symbol *symbol, const unsigned char s
|
||||
int *length, const int disallow_4byte);
|
||||
|
||||
|
||||
/* Process `source` for manual FNC1 extra escape sequences, placing result in `dest` with result length in `p_len`,
|
||||
and setting `fncs` with found FNC1s. `dest` & `fncs` must be at least `length` in size. `eci` is checked to be
|
||||
ASCII-compatible (UTF-8 & single-byte ECIs, excl. Binary 899). On error sets `errtxt` & returns error no. */
|
||||
INTERNAL int z_extra_escapes(struct zint_symbol *symbol, const unsigned char source[], const int length,
|
||||
const int eci, unsigned char dest[], char *fncs, int *p_len);
|
||||
|
||||
|
||||
/* Treats source as ISO/IEC 8859-1 and copies into `symbol->text`, converting to UTF-8. Control chars (incl. DEL) and
|
||||
non-ISO/IEC 8859-1 (0x80-9F) are replaced with spaces. Returns warning if truncated, else 0 */
|
||||
INTERNAL int z_hrt_cpy_iso8859_1(struct zint_symbol *symbol, const unsigned char source[], const int length);
|
||||
@@ -346,6 +354,10 @@ INTERNAL void z_ct_free_segs(struct zint_symbol *symbol);
|
||||
If seg eci not set, content seg eci set to 3. On error sets `errxtxt`, returning BARCODE_ERROR_MEMORY */
|
||||
INTERNAL int z_ct_cpy_segs(struct zint_symbol *symbol, const struct zint_seg segs[], const int seg_count);
|
||||
|
||||
/* Process content seg `seg_idx` buffer for manual FNC1 extra escape sequences (which must exist),
|
||||
and update its ECI to `eci`, if set, to reflect (feedback) the actual ECI used */
|
||||
INTERNAL void z_ct_set_seg_extra_escapes_eci(struct zint_symbol *symbol, const int seg_idx, const int eci);
|
||||
|
||||
/* Update the ECI of content seg `seg_idx` to `eci`, to reflect (feedback) the actual ECI used */
|
||||
INTERNAL void z_ct_set_seg_eci(struct zint_symbol *symbol, const int seg_idx, const int eci);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user