1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-05-12 00:53:49 +00:00

AUSPOST: support Null FCC (DPID all zeroes); TODO: BWIPP support

CODE128: properly fix not switching before FNC1 in 2nd position
  after alpha (commit [7b0767])
PLANET/KIX: adapt POSTNET to cater for both
general: use static strings to save a few bytes (start/stop in
  particular); various other code fiddles
postal: move tables into funcs
This commit is contained in:
gitlost
2026-04-22 21:25:16 +01:00
parent 7f688b9e58
commit b40393723f
24 changed files with 479 additions and 517 deletions

View File

@@ -535,6 +535,7 @@ static void SumASCII(uchar **ppOutPos, const int Sum, const int CharacterSet) {
/* Main function called by zint framework
*/
INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[], int length) {
static const char stop[7] = { '2','3','3','1','1','1','2' }; /* Stop character */
int charCur, dataLength;
int error_number;
int rows, columns, useColumns;
@@ -859,7 +860,7 @@ INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[],
for (c = 0; c < columns - 1; c++, d += 6) {
memcpy(d, zint_C128Table[pOutput[rc + c]], 6);
}
memcpy(d, "2331112", 7); /* Stop character (106, not in `zint_C128Table[]`) */
memcpy(d, stop, 7); /* Stop character (106, not in `zint_C128Table[]`) */
d += 7;
z_expand(symbol, dest, (int) (d - dest));
}