mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-14 18:13:53 +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:
@@ -66,6 +66,7 @@ static const char BC412Table[35][8] = {
|
||||
};
|
||||
|
||||
INTERNAL int zint_bc412(struct zint_symbol *symbol, unsigned char source[], int length) { /* IBM BC412 */
|
||||
static const char stop_start[4] = { '1','1','1','2' }; /* 1st 3 stop, last 2 start */
|
||||
unsigned char padded_source[20];
|
||||
int posns[35];
|
||||
int i, counter_odd = 0, counter_even = 0, check_sum = 0;
|
||||
@@ -119,7 +120,7 @@ INTERNAL int zint_bc412(struct zint_symbol *symbol, unsigned char source[], int
|
||||
posns[1] = check_sum;
|
||||
|
||||
/* Start character */
|
||||
memcpy(d, "12", 2);
|
||||
memcpy(d, stop_start + 2, 2);
|
||||
d += 2;
|
||||
|
||||
for (i = 0; i <= length; i++, d += 8) {
|
||||
@@ -127,7 +128,7 @@ INTERNAL int zint_bc412(struct zint_symbol *symbol, unsigned char source[], int
|
||||
}
|
||||
|
||||
/* Stop character */
|
||||
memcpy(d, "111", 3);
|
||||
memcpy(d, stop_start, 3);
|
||||
d += 3;
|
||||
|
||||
z_expand(symbol, dest, (int) (d - dest));
|
||||
|
||||
Reference in New Issue
Block a user