CODE128: allow for extended latching (double FNC4) spanning

intermediate CodeC sequence by setting `f_state` only if in
  CodeA/B & checking before adding extended mode switch (cf
  OkapiBarcode commit [9ce6dcc], props Daniel Gredler)
DATAMATRIX: in FAST_MODE re-process any buffered X12 characters
  when mode changes from X12 (cf OkapiBarcode commit [fb7981e],
  props Daniel Gredler)
CODABLOCKF: allow for FNC4 when estimating no. of rows required
CODE16K: make sure row calculation accurate by dispensing with
  glyph estimate & using actual codeword count
CODE16K: ensure initial mode selection allows for extended
  characters
vector.c: add `z_alloca()` cast for `first_row_rects` (ticket
  #272)
MSVC project files: remove incorrect "CompileACpp" setting from
  libzint project files (ticket #272)
bwipp_dump.ps: fix 2/4-track processing; update to latest BWIPP
manual/man page/GUI: Code 16k -> Code 16K
This commit is contained in:
gitlost 2022-10-13 13:33:59 +01:00
parent 92a4a25ed2
commit ada19fc079
32 changed files with 804 additions and 561 deletions

View file

@ -317,7 +317,7 @@ static int Columns2Rows(struct zint_symbol *symbol, CharacterSetTable *T, const
emptyColumns--;
} else {
/* Must change to A or B */
if (emptyColumns == 1) {
if (emptyColumns == 1 || (isFNC4 && emptyColumns == 2)) {
/* Can't switch: */
pSet[charCur - 1] |= CEnd + CFill;
emptyColumns = 0;
@ -362,7 +362,7 @@ static int Columns2Rows(struct zint_symbol *symbol, CharacterSetTable *T, const
}
} while (rowsCur > 44);
if (symbol->debug & ZINT_DEBUG_PRINT) {
printf(" -> out: rowsCur <%i>, useColumns <%i>, fillings <%i>\n", rowsCur, useColumns, fillings);
printf(" -> out: rowsCur <%d>, useColumns <%d>, fillings <%d>\n", rowsCur, useColumns, fillings);
}
*pUseColumns = useColumns;
*pRows = rowsCur;
@ -388,7 +388,7 @@ static int Rows2Columns(struct zint_symbol *symbol, CharacterSetTable *T, const
columnsRequested = *pUseColumns >= 4 ? *pUseColumns : 0;
if (symbol->debug & ZINT_DEBUG_PRINT) {
printf("Optimizer : Searching <%i> rows\n", rowsRequested);
printf("Optimizer : Searching <%d> rows\n", rowsRequested);
}
if (columnsRequested) {
@ -841,7 +841,7 @@ INTERNAL int codablockf(struct zint_symbol *symbol, unsigned char source[], int
printf("\n");
}
}
printf("rows=%i columns=%i fillings=%i\n", rows, columns, fillings);
printf("rows=%d columns=%d (%d data) fillings=%d\n", rows, columns, columns - 5, fillings);
}
#ifdef ZINT_TEST
if (symbol->debug & ZINT_DEBUG_TEST) {