mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 13:34:19 -04:00
backported
This commit is contained in:
parent
d8330f5d96
commit
91f66ec57d
4 changed files with 11 additions and 10 deletions
|
@ -46,14 +46,6 @@ int ctoi(const char source) {
|
|||
return (source - 'A' + 10);
|
||||
}
|
||||
|
||||
/* Converts an integer value to its hexadecimal character */
|
||||
char itoc(const int source) {
|
||||
if ((source >= 0) && (source <= 9)) {
|
||||
return ('0' + source);
|
||||
} else {
|
||||
return ('A' + (source - 10));
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert an integer value to a string representing its binary equivalent */
|
||||
void bin_append(const int arg, const int length, char *binary) {
|
||||
|
@ -74,6 +66,14 @@ void bin_append(const int arg, const int length, char *binary) {
|
|||
return;
|
||||
}
|
||||
|
||||
/* Converts an integer value to its hexadecimal character */
|
||||
char itoc(const int source) {
|
||||
if ((source >= 0) && (source <= 9)) {
|
||||
return ('0' + source);
|
||||
} else {
|
||||
return ('A' + (source - 10));
|
||||
}
|
||||
}
|
||||
/* Converts lower case characters to upper case in a string source[] */
|
||||
void to_upper(unsigned char source[]) {
|
||||
size_t i, src_len = ustrlen(source);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue