gs1/gs1_lint: update to latest gs1-syntax-dictionary, removing

`iso3166list` linter and adjusting all others to allow for
  multiple optional linters (by checking `data_len` vs `offset`)
library: change invalid `input_mode` reset to return warning;
  split func table into 2 - func declarations without prototype
  will be error in C23;
  make invalid symbology check a separate function using a table
  and call near beginning of `ZBarcode_Encode_Segs()`;
  in `ZBarcode_BarcodeName()` save some bytes by simplifying
  name table and removing "BARCODE_" prefix from entries
output: fix pack logic to use pragma by default (actually more
  portable than `__attribute__`)
common.h: remove C99 detection which was artifice of specifying
  "-std=", and rejig layout to be more logical
BWIPP: update to latest version
general: change `ZINT_VERSION_BUILD` tests to `#if`s
general: further fiddling with some tables to save a few bytes
CLI: change function arg `optarg` -> `arg` so doesn't shadow
  global
general: library now compilable with Comp Cert C (though as it
  doesn't support `alloca()` will have multiple memory leaks)
This commit is contained in:
gitlost 2024-06-27 23:00:13 +01:00
parent d70edce067
commit 7246d67175
33 changed files with 1579 additions and 1434 deletions

View file

@ -49,9 +49,9 @@ static const char C25IndustTable[10][10] = {
};
/* Note `c25_common()` assumes Stop string length one less than Start */
static const char *C25MatrixStartStop[2] = { "411111", "41111" };
static const char *C25IndustStartStop[2] = { "313111", "31113" };
static const char *C25IataLogicStartStop[2] = { "1111", "311" };
static const char C25MatrixStartStop[2][6] = { {'4', '1', '1', '1', '1', '1'}, {'4', '1', '1', '1', '1'} };
static const char C25IndustStartStop[2][6] = { {'3', '1', '3', '1', '1', '1'}, {'3', '1', '1', '1', '3'} };
static const char C25IataLogicStartStop[2][6] = { {'1', '1', '1', '1'}, {'3', '1', '1'} };
static const char C25InterTable[10][5] = {
{'1','1','3','3','1'}, {'3','1','1','1','3'}, {'1','3','1','1','3'}, {'3','3','1','1','1'}, {'1','1','3','1','3'},
@ -64,7 +64,7 @@ static char c25_check_digit(const unsigned int count) {
/* Common to Standard (Matrix), Industrial, IATA, and Data Logic */
static int c25_common(struct zint_symbol *symbol, const unsigned char source[], int length, const int max,
const int is_matrix, const char *start_stop[2], const int start_length, const int error_base) {
const int is_matrix, const char start_stop[2][6], const int start_length, const int error_base) {
int i;
char dest[818]; /* Largest destination 4 + (80 + 1) * 10 + 3 + 1 = 818 */