mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-17 18:07:02 +00:00
Converted zint_symbol structure usage to a more compressed format
This commit is contained in:
@@ -62,14 +62,14 @@ int telepen(struct zint_symbol *symbol, unsigned char source[])
|
||||
count = 0;
|
||||
|
||||
if(ustrlen(source) > 30) {
|
||||
strcpy(symbol->errtxt, "Input too long [321]");
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
for(i = 0; i < ustrlen(source); i++) {
|
||||
if(source[i] > 127) {
|
||||
/* Cannot encode extended ASCII */
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data [322]");
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data");
|
||||
return ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
@@ -115,13 +115,13 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[])
|
||||
count = 0;
|
||||
|
||||
if(input_length > 60) {
|
||||
strcpy(symbol->errtxt, "Input too long [871]");
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ERROR_TOO_LONG;
|
||||
}
|
||||
to_upper(local_source);
|
||||
error_number = is_sane(NASET, local_source);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data [872]");
|
||||
strcpy(symbol->errtxt, "Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[])
|
||||
for (i=0; i < input_length; i+=2)
|
||||
{
|
||||
if(local_source[i] == 'X') {
|
||||
strcpy(symbol->errtxt, "Invalid position of X in Telepen data [873]");
|
||||
strcpy(symbol->errtxt, "Invalid position of X in Telepen data");
|
||||
return ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user