mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-24 20:14:28 -04:00
Avoid possible confusion with Windows error code
Bugfix by Oxy Genic
Ref: 34857131
/
This commit is contained in:
parent
7ae95b2b42
commit
2e59058615
31 changed files with 3878 additions and 3878 deletions
|
@ -236,7 +236,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
/* This only blocks rediculously long input - the actual length of the
|
||||
resulting barcode depends on the type of data, so this is trapped later */
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
/* Detect extended ASCII characters */
|
||||
|
@ -403,7 +403,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
}
|
||||
if(glyph_count > 80.0) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
/* So now we know what start character to use - we can get on with it! */
|
||||
|
@ -635,13 +635,13 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
/* This only blocks rediculously long input - the actual length of the
|
||||
resulting barcode depends on the type of data, so this is trapped later */
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
for(i = 0; i < length; i++) {
|
||||
if(source[i] == '\0') {
|
||||
/* Null characters not allowed! */
|
||||
strcpy(symbol->errtxt, "NULL character in input data");
|
||||
return ERROR_INVALID_DATA;
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -766,7 +766,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
}
|
||||
if(glyph_count > 80.0) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
/* So now we know what start character to use - we can get on with it! */
|
||||
|
@ -939,11 +939,11 @@ int nve_18(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
|
||||
if(sourcelen > 17) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
error_number = is_sane(NEON, source, length);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
if(error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
|
@ -980,11 +980,11 @@ int ean_14(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
|
||||
if(length > 13) {
|
||||
strcpy(symbol->errtxt, "Input wrong length");
|
||||
return ERROR_TOO_LONG;
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
error_number = is_sane(NEON, source, length);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
if(error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid character in data");
|
||||
return error_number;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue