mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-23 12:57:07 +00:00
GS1: add new AI 7011 (GSCN 22-163)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* GS1 AI checker generated by "backend/tools/gen_gs1_lint.php" from
|
||||
* standards/GS1/gs1-syntax-dictionary-2022-07-11.txt
|
||||
* https://ref.gs1.org/tools/gs1-barcode-syntax-resource/syntax-dictionary/
|
||||
*/
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
@@ -355,6 +355,18 @@ static int x__2(const unsigned char *data, const int data_len,
|
||||
&& cset82(data, data_len, 0, 1, 2, p_err_no, p_err_posn, err_msg);
|
||||
}
|
||||
|
||||
/* N6,yymmdd [N4],hhmm (Used by TEST BY DATE) */
|
||||
static int n6_yymmdd__n4__hhmm(const unsigned char *data, const int data_len,
|
||||
int *p_err_no, int *p_err_posn, char err_msg[50]) {
|
||||
return data_len >= 6 && data_len <= 10
|
||||
&& yymmdd(data, data_len, 0, 6, 6, p_err_no, p_err_posn, err_msg, 1 /*length_only*/)
|
||||
&& hhmm(data, data_len, 6, 0, 4, p_err_no, p_err_posn, err_msg, 1 /*length_only*/)
|
||||
&& numeric(data, data_len, 0, 6, 6, p_err_no, p_err_posn, err_msg)
|
||||
&& yymmdd(data, data_len, 0, 6, 6, p_err_no, p_err_posn, err_msg, 0)
|
||||
&& numeric(data, data_len, 6, 0, 4, p_err_no, p_err_posn, err_msg)
|
||||
&& hhmm(data, data_len, 6, 0, 4, p_err_no, p_err_posn, err_msg, 0);
|
||||
}
|
||||
|
||||
/* N3,iso3166999 X..27 (Used by PROCESSOR # 0, PROCESSOR # 1, PROCESSOR # 2, PROCESSOR # 3...) */
|
||||
static int n3_iso3166999_x__27(const unsigned char *data, const int data_len,
|
||||
int *p_err_no, int *p_err_posn, char err_msg[50]) {
|
||||
@@ -759,6 +771,9 @@ static int gs1_lint(const int ai, const unsigned char *data, const int data_len,
|
||||
if (ai == 7010) {
|
||||
return x__2(data, data_len, p_err_no, p_err_posn, err_msg);
|
||||
}
|
||||
if (ai == 7011) {
|
||||
return n6_yymmdd__n4__hhmm(data, data_len, p_err_no, p_err_posn, err_msg);
|
||||
}
|
||||
if (ai >= 7020 && ai <= 7022) {
|
||||
return x__20(data, data_len, p_err_no, p_err_posn, err_msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user