CODE128: optimize for extended ASCII as well using techniques from

BWIPP minimal encoding by Bue Jensen (BWIPP PR #278);
  new extra escape `\^@` to turn off manual switching
zint.h: increase `symbol->text` size 200 -> 256 (means that for
  the moment can no longer generate ZINT_WARN_HRT_TRUNCATED)
GS1_128/GS1_128_CC: warn if READER_INIT option used
CODE16K: move `c16k_set_a/b/c()` routines from "code128.c" and
  rename `c16k_` (also `C128_` defines to `C16K_`)
common: make `itoc()` simple macro which adds '0' (>= 10 now ':',
  ';' etc) and adjust `expand()` accordingly for slight speed-up
general: EXTRA_ESCAPE_MODE now implies ESCAPE_MODE
tests: update BWIPP to latest and enable CODE128AB ("suppressc");
  new test args '-n' (exclude func) and '-m' (match func)
This commit is contained in:
gitlost 2024-11-18 05:08:52 +00:00
parent c9909d3d91
commit 86b6a0553b
23 changed files with 1113 additions and 1017 deletions

View file

@ -60,8 +60,8 @@ static void test_large(const testCtx *const p_ctx) {
/* 8*/ { -1, -1, "\351", 2726 / 2 + 1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 413: Input too long, requires too many symbol characters (maximum 2726)" },
/* 9*/ { -1, -1, "\001", 2726, 0, 44, 739, "" },
/* 10*/ { -1, -1, "\001", 2727, ZINT_ERROR_TOO_LONG, -1, -1, "Error 413: Input too long, requires too many symbol characters (maximum 2726)" },
/* 11*/ { 1, -1, "A", 99, 0, 1, 1124, "" }, /* CODE128 99 max */
/* 12*/ { 1, -1, "A", 100, ZINT_ERROR_TOO_LONG, -1, -1, "Error 341: Input too long, requires 100 symbol characters (maximum 99)" },
/* 11*/ { 1, -1, "A", 101, 0, 1, 1146, "" }, /* CODE128 102 max (including start code) */
/* 12*/ { 1, -1, "A", 102, ZINT_ERROR_TOO_LONG, -1, -1, "Error 341: Input too long, requires 103 symbol characters (maximum 102)" },
/* 13*/ { 2, -1, "A", 122, 0, 2, 739, "" },
/* 14*/ { 2, 10, "A", 122, 0, 2, 739, "" }, /* Cols 10 -> 67 */
/* 15*/ { 2, 67, "A", 122, 0, 2, 739, "" },