- CODABLOCKF: fix misencodation of extended ASCII 0xB0-0xB9 when

followed by digit (ignore 2nd byte of FNC4 when categorizing
  Code C characters)
- New `ZBarcode_Cap()` flag `ZINT_CAP_BINDABLE`, differentiated
  from `ZINT_CAP_STACKABLE`, and new Qt Backend method
  `isBindable()`
- CLI: fix `separator` check to use new `ZINT_CAP_BINDABLE` instead
  of `ZINT_CAP_STACKABLE`
- ZBarcode_Cap: add missing symbologies to `ZINT_CAP_BINDABLE` (was
  `ZINT_CAP_STACKABLE`)
- DOTCODE: pad rows if given number of columns instead of failing
  if rows below min (5)
- DBAR/composites: ensure stacked symbologies and composites are
  not stacked (set `symbol->rows` to 0)
- test suite: move `test_perf` routines into single test
  "test_perf";
  new "test_random" (based on "test_bwipp") to test various
  symbologies with random binary - discovered CODABLOCKF bug;
  expand "test_bwipp"
manual: Feeback: mention AZTEC -1 meaning min & MICROPDF417:
  doc new `ZINT_CAP_BINDABLE`
general: various code fiddlings and re-formattings
This commit is contained in:
gitlost 2025-04-03 16:08:15 +01:00
parent 2370fbfbb7
commit a74871a7de
60 changed files with 3509 additions and 3267 deletions

View file

@ -1293,12 +1293,9 @@ static void qr_add_format_info(unsigned char *grid, const int size, const int ec
int i;
switch (ecc_level) {
case QR_LEVEL_L: format |= 0x08;
break;
case QR_LEVEL_Q: format |= 0x18;
break;
case QR_LEVEL_H: format |= 0x10;
break;
case QR_LEVEL_L: format |= 0x08; break;
case QR_LEVEL_Q: format |= 0x18; break;
case QR_LEVEL_H: format |= 0x10; break;
}
seq = qr_annex_c[format];
@ -2067,14 +2064,10 @@ static int microqr_evaluate(const unsigned char *grid, const int size, const int
int sum1, sum2, i, filter = 0, retval;
switch (pattern) {
case 0: filter = 0x01;
break;
case 1: filter = 0x02;
break;
case 2: filter = 0x04;
break;
case 3: filter = 0x08;
break;
case 0: filter = 0x01; break;
case 1: filter = 0x02; break;
case 2: filter = 0x04; break;
case 3: filter = 0x08; break;
}
sum1 = 0;
@ -2418,8 +2411,6 @@ INTERNAL int upnqr(struct zint_symbol *symbol, unsigned char source[], int lengt
char *mode = (char *) z_alloca(length + 1);
unsigned char *preprocessed = (unsigned char *) z_alloca(length + 1);
symbol->eci = 4; /* Set before any processing */
user_mask = (symbol->option_3 >> 8) & 0x0F; /* User mask is pattern + 1, so >= 1 and <= 8 */
if (user_mask > 8) {
user_mask = 0; /* Ignore */