mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
backported
This commit is contained in:
parent
d8330f5d96
commit
91f66ec57d
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#ifdef _MSC_VER
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user