Audit of error codes

This commit is contained in:
Robin Stuart 2017-07-27 16:01:53 +01:00
parent 58e80a9ff7
commit 608b4b9134
38 changed files with 345 additions and 345 deletions

View file

@ -66,7 +66,7 @@ int telepen(struct zint_symbol *symbol, unsigned char source[], const size_t src
count = 0;
if (src_len > 30) {
strcpy(symbol->errtxt, "Input too long (C90)");
strcpy(symbol->errtxt, "390: Input too long");
return ZINT_ERROR_TOO_LONG;
}
/* Start character */
@ -75,7 +75,7 @@ int telepen(struct zint_symbol *symbol, unsigned char source[], const size_t src
for (i = 0; i < src_len; i++) {
if (source[i] > 126) {
/* Cannot encode extended ASCII */
strcpy(symbol->errtxt, "Invalid characters in input data (C91)");
strcpy(symbol->errtxt, "391: Invalid characters in input data");
return ZINT_ERROR_INVALID_DATA;
}
strcat(dest, TeleTable[source[i]]);
@ -113,14 +113,14 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[], const size_t
count = 0;
if (temp_length > 60) {
strcpy(symbol->errtxt, "Input too long (C92)");
strcpy(symbol->errtxt, "392: Input too long");
return ZINT_ERROR_TOO_LONG;
}
ustrcpy(temp, source);
to_upper(temp);
error_number = is_sane(SODIUM, temp, temp_length);
if (error_number == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "Invalid characters in data (C93)");
strcpy(symbol->errtxt, "393: Invalid characters in data");
return error_number;
}
@ -137,7 +137,7 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[], const size_t
for (i = 0; i < temp_length; i += 2) {
if (temp[i] == 'X') {
strcpy(symbol->errtxt, "Invalid position of X in Telepen data (C94)");
strcpy(symbol->errtxt, "394: Invalid position of X in Telepen data");
return ZINT_ERROR_INVALID_DATA;
}