mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Implemented DM ECC200 Macro 05/06 encodation
This commit is contained in:
parent
a9a9473ccf
commit
8bf4d5906a
@ -415,6 +415,32 @@ int dm200encode(struct zint_symbol *symbol, unsigned char source[], unsigned cha
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for Macro05/Macro06 */
|
||||||
|
/* "[)>[RS]05[GS]...[RS][EOT]" -> CW 236 */
|
||||||
|
/* "[)>[RS]06[GS]...[RS][EOT]" -> CW 237 */
|
||||||
|
if (tp == 0 && sp == 0 && inputlen >= 9
|
||||||
|
&& source[0] == '[' && source[1] == ')' && source[2] == '>'
|
||||||
|
&& source[3] == '\x1e' && source[4] == '0'
|
||||||
|
&& (source[5] == '5' || source[5] == '6')
|
||||||
|
&& source[6] == '\x1d'
|
||||||
|
&& source[inputlen-2] == '\x1e' && source[inputlen-1] == '\x04' )
|
||||||
|
{
|
||||||
|
/* Output macro Codeword */
|
||||||
|
if (source[5] == '5') {
|
||||||
|
target[tp] = 236;
|
||||||
|
if(debug) printf("Macro05 ");
|
||||||
|
} else {
|
||||||
|
target[tp] = 237;
|
||||||
|
if(debug) printf("Macro06 ");
|
||||||
|
}
|
||||||
|
tp++;
|
||||||
|
concat(binary, " ");
|
||||||
|
/* Remove macro characters from input string */
|
||||||
|
sp = 7;
|
||||||
|
inputlen -= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
while (sp < inputlen) {
|
while (sp < inputlen) {
|
||||||
|
|
||||||
current_mode = next_mode;
|
current_mode = next_mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user