Allow FNC1 to be implied by mode character in Code 16k and pass reduced string of correct signedness

This commit is contained in:
hooper114 2009-01-13 20:42:45 +00:00
parent 9b569c8717
commit c6728f4c17
4 changed files with 41 additions and 6 deletions

View file

@ -246,4 +246,20 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[
/* the character '[' in the reduced string refers to the FNC1 character */
return 0;
}
}
int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], unsigned char reduced[])
{
/* Only to keep the compiler happy */
char temp[ustrlen(source) + 5];
int error_number, i;
error_number = gs1_verify(symbol, source, temp);
if(error_number != 0) { return error_number; }
for(i = 0; i <= strlen(temp); i++) {
reduced[i] = (unsigned char)temp[i];
}
return 0;
}