gs1: New AIs 7041 (GSCN 23-272) (packagetype) and 716 (GSCN-24-157)

CODE49: Better error message on ZINT_ERROR_TOO_LONG
manual: Use floating pt notation for floating pt args on options
backend/tools/data: Remove overlooked "GB2312.TXT" from git
raster: `size2` -> `prev_size`; one line `malloc()`s
C25/CODE128: some code fiddling
tests/PNG: Add some more text examples
This commit is contained in:
gitlost 2024-09-18 03:40:45 +01:00
parent 93c3e27fba
commit b42d5baf4c
19 changed files with 790 additions and 7937 deletions

View file

@ -414,6 +414,15 @@ static int n1_x1_x1_x1_importeridx(const unsigned char *data,
&& importeridx(data, data_len, 3, 1, 1, p_err_no, p_err_posn, err_msg, 0);
}
/* X..4,packagetype (Used by UFRGT UNIT TYPE) */
static int x__4_packagetype(const unsigned char *data,
const int data_len, int *p_err_no, int *p_err_posn, char err_msg[50]) {
return data_len >= 1 && data_len <= 4
&& packagetype(data, data_len, 0, 1, 4, p_err_no, p_err_posn, err_msg, 1 /*length_only*/)
&& cset82(data, data_len, 0, 1, 4, p_err_no, p_err_posn, err_msg)
&& packagetype(data, data_len, 0, 1, 4, p_err_no, p_err_posn, err_msg, 0);
}
/* X2 X..28 (Used by CERT # 1, CERT # 2, CERT # 3, CERT # 4, CERT # 5, CERT # 6, CERT # 7, CERT # 8, CERT # 9, ...) */
static int x2_x__28(const unsigned char *data,
const int data_len, int *p_err_no, int *p_err_posn, char err_msg[50]) {
@ -750,7 +759,7 @@ static int gs1_lint(const int ai, const unsigned char *data, const int data_len,
} else if (ai < 800) {
if (ai >= 710 && ai <= 715) {
if (ai >= 710 && ai <= 716) {
return x__20(data, data_len, p_err_no, p_err_posn, err_msg);
}
@ -897,6 +906,9 @@ static int gs1_lint(const int ai, const unsigned char *data, const int data_len,
if (ai == 7040) {
return n1_x1_x1_x1_importeridx(data, data_len, p_err_no, p_err_posn, err_msg);
}
if (ai == 7041) {
return x__4_packagetype(data, data_len, p_err_no, p_err_posn, err_msg);
}
} else if (ai < 7300) {