mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-14 15:14:49 -04:00
Move escape character processing into library
And expand to include all 8-bit values.
This commit is contained in:
parent
1fb99fff8c
commit
0314ca65a8
5 changed files with 142 additions and 89 deletions
|
@ -43,7 +43,11 @@ size_t ustrlen(const unsigned char data[]) {
|
|||
int ctoi(const char source) {
|
||||
if ((source >= '0') && (source <= '9'))
|
||||
return (source - '0');
|
||||
return (source - 'A' + 10);
|
||||
if ((source >= 'A') && (source <= 'F'))
|
||||
return (source - 'A' + 10);
|
||||
if ((source >= 'a') && (source <= 'f'))
|
||||
return (source - 'a' + 10);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue