diff --git a/backend/common.c b/backend/common.c index 5c62e94c..0e012fa3 100644 --- a/backend/common.c +++ b/backend/common.c @@ -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); diff --git a/backend/common.h b/backend/common.h index 73b87218..4bc3fc19 100644 --- a/backend/common.h +++ b/backend/common.h @@ -57,10 +57,10 @@ extern "C" { extern size_t ustrlen(const unsigned char source[]); extern int ctoi(const char source); extern char itoc(const int source); - extern void bin_append(const int arg, const int length, char *binary); extern void to_upper(unsigned char source[]); extern int is_sane(const char test_string[], const unsigned char source[], const size_t length); extern void lookup(const char set_string[], const char *table[], const char data, char dest[]); + extern void bin_append(const int arg, const int length, char *binary); extern int posn(const char set_string[], const char data); extern int module_is_set(const struct zint_symbol *symbol, const int y_coord, const int x_coord); extern void set_module(struct zint_symbol *symbol, const int y_coord, const int x_coord); diff --git a/backend/composite.c b/backend/composite.c index d69427a6..a5bd590c 100644 --- a/backend/composite.c +++ b/backend/composite.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #ifdef _MSC_VER diff --git a/backend/qr.c b/backend/qr.c index cf0364a0..87defbca 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -1313,7 +1313,7 @@ static void applyOptimisation(const int version,char inputMode[], const size_t i free(blockMode); } -static int blockLength(const size_t start,const char inputMode[],const size_t inputLength) { +static size_t blockLength(const size_t start,const char inputMode[],const size_t inputLength) { /* Find the length of the block starting from 'start' */ size_t i; int count;