As get_best_eci() can no longer return 0 remove caller checks

library: simplify dealing one-letter escapes into one case;
  other fiddlings (`first_err` -> `warn_number`)
This commit is contained in:
gitlost 2024-03-05 22:09:05 +00:00
parent 11b3c18aed
commit 624574a64c
10 changed files with 80 additions and 144 deletions

View file

@ -557,6 +557,7 @@ static void test_escape_char_process(const testCtx *const p_ctx) {
/* 78*/ { BARCODE_CODE128, DATA_MODE | EXTRA_ESCAPE_MODE, -1, "\\^A1", "", 0, 46, "(4) 103 17 17 106", 0, "" },
/* 79*/ { BARCODE_CODE128, EXTRA_ESCAPE_MODE, -1, "\\^", "", 0, 57, "(5) 104 60 62 82 106", 0, "Partial special escape '\\^' at end allowed" },
/* 80*/ { BARCODE_CODE128, EXTRA_ESCAPE_MODE, -1, "\\^D1", "", 0, 79, "(7) 104 60 62 36 17 52 106", 0, "Unknown special escapes passed straight thu" },
/* 81*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, "\\w", "", ZINT_ERROR_INVALID_DATA, 0, "Error 234: Unrecognised escape character '\\w' in input data", 0, "" },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;