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

ERROR_* renamed to ZERROR*

This commit is contained in:
tgotic
2011-01-17 19:30:34 +01:00
parent 5b76379379
commit 6cc15aa346

View File

@@ -98,10 +98,10 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length)
if(length > 121) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
error_number = is_sane(SODIUM, source, length);
if(error_number == ERROR_INVALID_DATA) {
if(error_number == ZERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data");
return error_number;
}
@@ -182,14 +182,14 @@ int c39(struct zint_symbol *symbol, unsigned char source[], int length)
if((symbol->symbology == BARCODE_LOGMARS) && (length > 59)) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
} else if(length > 74) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
to_upper(source);
error_number = is_sane(SILVER , source, length);
if(error_number == ERROR_INVALID_DATA) {
if(error_number == ZERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data");
return error_number;
}
@@ -273,10 +273,10 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length
count = 0;
if(length > 6) {
strcpy(symbol->errtxt, "Input wrong length");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
error_number = is_sane(NEON, source, length);
if(error_number == ERROR_INVALID_DATA) {
if(error_number == ZERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data");
return error_number;
}
@@ -297,7 +297,7 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length
localstr[8] = '\0';
if(localstr[7] == 'A') {
strcpy(symbol->errtxt, "Invalid PZN Data");
return ERROR_INVALID_DATA;
return ZERROR_INVALID_DATA;
}
error_number = c39(symbol, (unsigned char *)localstr, strlen(localstr));
ustrcpy(symbol->text, (unsigned char *)"PZN");
@@ -319,7 +319,7 @@ int ec39(struct zint_symbol *symbol, unsigned char source[], int length)
if(length > 74) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
/* Creates a buffer string and places control characters into it */
@@ -327,7 +327,7 @@ int ec39(struct zint_symbol *symbol, unsigned char source[], int length)
if(source[i] > 127) {
/* Cannot encode extended ASCII */
strcpy(symbol->errtxt, "Invalid characters in input data");
return ERROR_INVALID_DATA;
return ZERROR_INVALID_DATA;
}
concat((char*)buffer, EC39Ctrl[source[i]]);
}
@@ -362,7 +362,7 @@ int c93(struct zint_symbol *symbol, unsigned char source[], int length)
if(length > 107) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
/* Message Content */
@@ -370,7 +370,7 @@ int c93(struct zint_symbol *symbol, unsigned char source[], int length)
if (source[i] > 127) {
/* Cannot encode extended ASCII */
strcpy(symbol->errtxt, "Invalid characters in input data");
return ERROR_INVALID_DATA;
return ZERROR_INVALID_DATA;
}
concat(buffer, C93Ctrl[source[i]]);
symbol->text[i] = source[i] ? source[i] : ' ';
@@ -380,7 +380,7 @@ int c93(struct zint_symbol *symbol, unsigned char source[], int length)
h = strlen(buffer);
if (h > 107) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
for (i = 0; i < h; i++) {
@@ -495,10 +495,10 @@ int channel_code(struct zint_symbol *symbol, unsigned char source[], int length)
if(length > 7) {
strcpy(symbol->errtxt, "Input too long");
return ERROR_TOO_LONG;
return ZERROR_TOO_LONG;
}
error_number = is_sane(NEON, source, length);
if(error_number == ERROR_INVALID_DATA) {
if(error_number == ZERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data");
return error_number;
}
@@ -522,7 +522,7 @@ int channel_code(struct zint_symbol *symbol, unsigned char source[], int length)
}
if(range) {
strcpy(symbol->errtxt, "Value out of range");
return ERROR_INVALID_DATA;
return ZERROR_INVALID_DATA;
}
for(i = 0; i < 11; i++) { B[i] = 0; S[i] = 0; }