mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-17 16:44:34 -04:00
ULTRA: enable compression for GS1_MODE; compression changes; fixes; tests
This commit is contained in:
parent
e86d9d1dc8
commit
e04f662dc0
21 changed files with 762 additions and 46 deletions
|
@ -477,4 +477,21 @@ void debug_test_codeword_dump(struct zint_symbol *symbol, unsigned char* codewor
|
|||
}
|
||||
symbol->errtxt[strlen(symbol->errtxt) - 1] = '\0'; /* Zap last space */
|
||||
}
|
||||
|
||||
void debug_test_codeword_dump_int(struct zint_symbol *symbol, int* codewords, int length) {
|
||||
int i, max = 0, cnt_len, errtxt_len;
|
||||
char temp[20];
|
||||
errtxt_len = sprintf(symbol->errtxt, "(%d) ", length); /* Place the number of codewords at the front */
|
||||
for (i = 0, cnt_len = errtxt_len; i < length; i++) {
|
||||
cnt_len += sprintf(temp, "%d ", codewords[i]);
|
||||
if (cnt_len > 92) {
|
||||
break;
|
||||
}
|
||||
max++;
|
||||
}
|
||||
for (i = 0; i < max; i++) {
|
||||
errtxt_len += sprintf(symbol->errtxt + errtxt_len, "%d ", codewords[i]);
|
||||
}
|
||||
symbol->errtxt[strlen(symbol->errtxt) - 1] = '\0'; /* Zap last space */
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue