mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-02 20:25:31 +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:
@@ -49,7 +49,7 @@ static int nve18_or_ean14(struct zint_symbol *symbol, const unsigned char source
|
||||
};
|
||||
const int idx = data_len == 17;
|
||||
unsigned char ean128_equiv[23];
|
||||
int i, zeroes;
|
||||
int i;
|
||||
unsigned char have_check_digit = '\0';
|
||||
unsigned char check_digit;
|
||||
int error_number;
|
||||
@@ -79,10 +79,8 @@ static int nve18_or_ean14(struct zint_symbol *symbol, const unsigned char source
|
||||
length--;
|
||||
}
|
||||
|
||||
zeroes = data_len - length;
|
||||
memcpy(ean128_equiv, prefix[idx][!(symbol->input_mode & GS1PARENS_MODE)], 4);
|
||||
memset(ean128_equiv + 4, '0', zeroes);
|
||||
memcpy(ean128_equiv + 4 + zeroes, source, length);
|
||||
z_zero_fill(source, length, ean128_equiv + 4, data_len);
|
||||
|
||||
check_digit = (unsigned char) zint_gs1_check_digit(ean128_equiv + 4, data_len);
|
||||
if (have_check_digit && have_check_digit != check_digit) {
|
||||
|
||||
Reference in New Issue
Block a user