compile error fixed

This commit is contained in:
oxy 2017-07-24 09:57:29 +02:00 committed by Robin Stuart
parent 91f66ec57d
commit 2e6fb6a109
3 changed files with 15 additions and 7 deletions

View File

@ -42,7 +42,7 @@
static int AztecMap[22801]; static int AztecMap[22801];
static int count_doubles(const unsigned char source[], int posn, const size_t src_len) { static int count_doubles(const unsigned char source[], const int posn, const size_t src_len) {
int c = 0; int c = 0;
int i = posn; int i = posn;
int cond = 1; int cond = 1;
@ -110,7 +110,7 @@ static int count_spaces(char source[], int posn, int length) {
return c; return c;
} }
static char get_next_mode(char encode_mode[], const size_t src_len, int posn) { static char get_next_mode(char encode_mode[], const size_t src_len, const int posn) {
int i = posn; int i = posn;
do { do {
@ -125,16 +125,24 @@ static char get_next_mode(char encode_mode[], const size_t src_len, int posn) {
static int aztec_text_process(const unsigned char source[], const size_t src_len, char binary_string[], const int gs1, const int eci, const int debug) { static int aztec_text_process(const unsigned char source[], const size_t src_len, char binary_string[], const int gs1, const int eci, const int debug) {
char encode_mode[src_len]; char *encode_mode;
int i, j; int i, j;
char current_mode; char current_mode;
int count; int count;
char next_mode; char next_mode;
char reduced_source[src_len]; char *reduced_source;
char reduced_encode_mode[src_len]; char *reduced_encode_mode;
int reduced_length; int reduced_length;
int byte_mode = 0; int byte_mode = 0;
encode_mode=(char*)alloca(src_len);
reduced_source=(char*)alloca(src_len);
reduced_encode_mode=(char*)alloca(src_len);
if ((!encode_mode) ||
(!reduced_source) ||
(!reduced_encode_mode)) return -1;
for (i = 0; i < src_len; i++) { for (i = 0; i < src_len; i++) {
if (source[i] > 128) { if (source[i] > 128) {
encode_mode[i] = 'B'; encode_mode[i] = 'B';

View File

@ -79,7 +79,7 @@ static const int AztecSymbolChar[128] = {
25, 26, 27, 29, 25, 30, 26, 27 25, 26, 27, 29, 25, 30, 26, 27
}; };
static const char AztecModes[128] = "BMMMMMMMMMMMMXBBBBBBBBBBBBBMMMMMXPPPPPPPPPPPXPXPDDDDDDDDDDPPPPPPMUUUUUUUUUUUUUUUUUUUUUUUUUUPMPMMMLLLLLLLLLLLLLLLLLLLLLLLLLLPMPMM"; static const char AztecModes[129] = "BMMMMMMMMMMMMXBBBBBBBBBBBBBMMMMMXPPPPPPPPPPPXPXPDDDDDDDDDDPPPPPPMUUUUUUUUUUUUUUUUUUUUUUUUUUPMPMMMLLLLLLLLLLLLLLLLLLLLLLLLLLPMPMM";
static const unsigned short int AztecSizes[32] = { static const unsigned short int AztecSizes[32] = {
/* Codewords per symbol */ /* Codewords per symbol */

View File

@ -343,7 +343,7 @@ void add_shift_char(char binary[], int shifty) {
bin_append(glyph, 6, binary); bin_append(glyph, 6, binary);
} }
static int gm_encode(int gbdata[], const size_t length, char binary[], int reader, int eci, int debug) { static int gm_encode(int gbdata[], const size_t length, char binary[],const int reader,const int eci, int debug) {
/* Create a binary stream representation of the input data. /* Create a binary stream representation of the input data.
7 sets are defined - Chinese characters, Numerals, Lower case letters, Upper case letters, 7 sets are defined - Chinese characters, Numerals, Lower case letters, Upper case letters,
Mixed numerals and latters, Control characters and 8-bit binary data */ Mixed numerals and latters, Control characters and 8-bit binary data */