1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-17 18:07:02 +00:00

Avoid possible confusion with Windows error code

Bugfix by Oxy Genic
Ref: https://sourceforge.net/p/zint/mailman/message/34857131/
This commit is contained in:
Robin Stuart
2016-02-17 10:37:20 +00:00
parent 7ae95b2b42
commit 2e59058615
31 changed files with 3878 additions and 3878 deletions

View File

@@ -139,7 +139,7 @@ int maxi_text_process(int mode, unsigned char source[], int length)
int set[144], character[144], i, j, done, count, current_set;
if(length > 138) {
return ERROR_TOO_LONG;
return ZINT_ERROR_TOO_LONG;
}
for(i = 0; i < 144; i++) {
@@ -459,15 +459,15 @@ int maxi_text_process(int mode, unsigned char source[], int length)
} while (i <= 143);
if(((mode ==2) || (mode == 3)) && (length > 84)) {
return ERROR_TOO_LONG;
return ZINT_ERROR_TOO_LONG;
}
if(((mode == 4) || (mode == 6)) && (length > 93)) {
return ERROR_TOO_LONG;
return ZINT_ERROR_TOO_LONG;
}
if((mode == 5) && (length > 77)) {
return ERROR_TOO_LONG;
return ZINT_ERROR_TOO_LONG;
}
@@ -605,7 +605,7 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length)
if((mode < 2) || (mode > 6)) { /* Only codes 2 to 6 supported */
strcpy(symbol->errtxt, "Invalid Maxicode Mode");
return ERROR_INVALID_OPTION;
return ZINT_ERROR_INVALID_OPTION;
}
if((mode == 2) || (mode == 3)) { /* Modes 2 and 3 need data in symbol->primary */
@@ -614,13 +614,13 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length)
}
if(lp != 15) {
strcpy(symbol->errtxt, "Invalid Primary String");
return ERROR_INVALID_DATA;
return ZINT_ERROR_INVALID_DATA;
}
for(i = 9; i < 15; i++) { /* check that country code and service are numeric */
if((symbol->primary[i] < '0') || (symbol->primary[i] > '9')) {
strcpy(symbol->errtxt, "Invalid Primary String");
return ERROR_INVALID_DATA;
return ZINT_ERROR_INVALID_DATA;
}
}
@@ -656,7 +656,7 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length)
}
i = maxi_text_process(mode, local_source, length);
if(i == ERROR_TOO_LONG ) {
if(i == ZINT_ERROR_TOO_LONG ) {
strcpy(symbol->errtxt, "Input data too long");
return i;
}