1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-11 05:55:58 +00:00

ERROR_* renamed to ZERROR*

This commit is contained in:
tgotic
2011-01-17 19:37:51 +01:00
parent f75319643d
commit 23087a32a4

View File

@@ -687,7 +687,7 @@ int gm_encode(int gbdata[], int length, char binary[], int reader)
break; break;
} }
if(strlen(binary) > 9191) { if(strlen(binary) > 9191) {
return ERROR_TOO_LONG; return ZERROR_TOO_LONG;
} }
} while(sp < length); } while(sp < length);
@@ -724,7 +724,7 @@ int gm_encode(int gbdata[], int length, char binary[], int reader)
} }
if(strlen(binary) > 9191) { if(strlen(binary) > 9191) {
return ERROR_TOO_LONG; return ZERROR_TOO_LONG;
} }
return 0; return 0;
} }
@@ -758,7 +758,7 @@ void gm_add_ecc(char binary[], int data_posn, int layers, int ecc_level, int wor
/* Add padding codewords */ /* Add padding codewords */
data[data_posn] = 0x00; data[data_posn] = 0x00;
for(i = (data_posn + 1); i < data_cw; i++) { for(i = (data_posn + 1); i < data_cw; i++) {
if(i % 2) { if(i & 1) {
data[i] = 0x7e; data[i] = 0x7e;
toggle = 1; toggle = 1;
} else { } else {
@@ -951,7 +951,7 @@ int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
} while ((j < 7445) && (glyph == 0)); } while ((j < 7445) && (glyph == 0));
if(glyph == 0) { if(glyph == 0) {
strcpy(symbol->errtxt, "Invalid character in input data"); strcpy(symbol->errtxt, "Invalid character in input data");
return ERROR_INVALID_DATA; return ZERROR_INVALID_DATA;
} }
gbdata[i] = glyph; gbdata[i] = glyph;
} }
@@ -1031,7 +1031,7 @@ int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
if(data_cw > data_max) { if(data_cw > data_max) {
strcpy(symbol->errtxt, "Input data too long"); strcpy(symbol->errtxt, "Input data too long");
return ERROR_TOO_LONG; return ZERROR_TOO_LONG;
} }
gm_add_ecc(binary, data_cw, layers, ecc_level, word); gm_add_ecc(binary, data_cw, layers, ecc_level, word);
@@ -1055,7 +1055,7 @@ int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
/* Add macromodule frames */ /* Add macromodule frames */
for(x = 0; x < modules; x++) { for(x = 0; x < modules; x++) {
dark = 1 - (x % 2); dark = 1 - (x & 1);
for(y = 0; y < modules; y++) { for(y = 0; y < modules; y++) {
if(dark == 1) { if(dark == 1) {
for(i = 0; i < 5; i++) { for(i = 0; i < 5; i++) {