mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-04 18:57:05 +00:00
ERROR_* renamed to ZERROR*
This commit is contained in:
@@ -687,7 +687,7 @@ int gm_encode(int gbdata[], int length, char binary[], int reader)
|
||||
break;
|
||||
}
|
||||
if(strlen(binary) > 9191) {
|
||||
return ERROR_TOO_LONG;
|
||||
return ZERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
} while(sp < length);
|
||||
@@ -724,7 +724,7 @@ int gm_encode(int gbdata[], int length, char binary[], int reader)
|
||||
}
|
||||
|
||||
if(strlen(binary) > 9191) {
|
||||
return ERROR_TOO_LONG;
|
||||
return ZERROR_TOO_LONG;
|
||||
}
|
||||
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 */
|
||||
data[data_posn] = 0x00;
|
||||
for(i = (data_posn + 1); i < data_cw; i++) {
|
||||
if(i % 2) {
|
||||
if(i & 1) {
|
||||
data[i] = 0x7e;
|
||||
toggle = 1;
|
||||
} else {
|
||||
@@ -951,7 +951,7 @@ int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
|
||||
} while ((j < 7445) && (glyph == 0));
|
||||
if(glyph == 0) {
|
||||
strcpy(symbol->errtxt, "Invalid character in input data");
|
||||
return ERROR_INVALID_DATA;
|
||||
return ZERROR_INVALID_DATA;
|
||||
}
|
||||
gbdata[i] = glyph;
|
||||
}
|
||||
@@ -1031,7 +1031,7 @@ int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
|
||||
|
||||
if(data_cw > data_max) {
|
||||
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);
|
||||
@@ -1055,7 +1055,7 @@ int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
|
||||
|
||||
/* Add macromodule frames */
|
||||
for(x = 0; x < modules; x++) {
|
||||
dark = 1 - (x % 2);
|
||||
dark = 1 - (x & 1);
|
||||
for(y = 0; y < modules; y++) {
|
||||
if(dark == 1) {
|
||||
for(i = 0; i < 5; i++) {
|
||||
|
||||
Reference in New Issue
Block a user