mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-11 00:23:55 +00:00
AZTEC: add manual FNC1 support:
improve P/S vs P/L choice when have ECI; add ZINT_DEBUG_TEST dump AUSPOST: allow variable length data input DATAMATRIX: do `EXTRA_ESCAPE_MODE` processing up front & check have non-zero length afterwards; disallow `READER_INIT` and `EXTRA_ESCAPE_MODE`; general: add new `z_zero_fill()` func & use; add new `z_extra_escape_position_fnc1()` helper; in `z_ct_set_seg_extra_escapes_eci` check position FNC1 whether or not have ECI library: escape_char_process: note escaped backslash followed by caret by passes `EXTRA_ESCAPE_MODE` check test suite: BWIPP: update to latest; support AUSPOST variants; process `EXTRA_ESCAPE_MODE` escaping up front
This commit is contained in:
@@ -181,11 +181,8 @@ static uint64_t dbar_to_uint64(const unsigned char source[], const int length) {
|
||||
|
||||
/* Helper to construct zero-padded GTIN14 with check digit, returning `buf` for convenience */
|
||||
static unsigned char *dbar_gtin14(const unsigned char *source, const int length, unsigned char buf[14]) {
|
||||
const int zeroes = 13 - length;
|
||||
const int zeroes = z_zero_fill(source, length, buf, 13);
|
||||
|
||||
assert(zeroes >= 0);
|
||||
memset(buf, '0', zeroes);
|
||||
memcpy(buf + zeroes, source, length);
|
||||
buf[zeroes + length] = zint_gs1_check_digit(buf, 13);
|
||||
|
||||
return buf;
|
||||
|
||||
Reference in New Issue
Block a user