From 13e16a062209eaf04b1b84a196c9e146def47d7c Mon Sep 17 00:00:00 2001 From: tgotic Date: Mon, 17 Jan 2011 19:31:59 +0100 Subject: [PATCH] ERROR_* renamed to ZERROR* --- backend/code16k.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/code16k.c b/backend/code16k.c index 8697601d..1a6ce5ab 100644 --- a/backend/code16k.c +++ b/backend/code16k.c @@ -189,7 +189,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) if(input_length > 157) { strcpy(symbol->errtxt, "Input too long"); - return ERROR_TOO_LONG; + return ZERROR_TOO_LONG; } e_count = 0; @@ -294,7 +294,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) for(i = 0; i < read; i++) { if(set[i] == 'C') { if(source[i] == '[') { - if(c_count % 2) { + if(c_count & 1) { if((i - c_count) != 0) { set[i - c_count] = 'B'; } else { @@ -306,7 +306,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) c_count++; } } else { - if(c_count % 2) { + if(c_count & 1) { if((i - c_count) != 0) { set[i - c_count] = 'B'; } else { @@ -316,7 +316,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) c_count = 0; } } - if(c_count % 2) { + if(c_count & 1) { if((i - c_count) != 0) { set[i - c_count] = 'B'; } else { @@ -384,7 +384,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) if(glyph_count > 77.0) { strcpy(symbol->errtxt, "Input too long"); - return ERROR_TOO_LONG; + return ZERROR_TOO_LONG; } /* Calculate how tall the symbol will be */ @@ -409,7 +409,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) if(m == 2) { m = 5; } if(gs1) { strcpy(symbol->errtxt, "Cannot use both GS1 mode and Reader Initialisation"); - return ERROR_INVALID_OPTION; + return ZERROR_INVALID_OPTION; } else { if((set[0] == 'B') && (set[1] == 'C')) { m = 6; } }