mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Make ultra.c compile on MS-VC 6
This commit is contained in:
parent
ea6c7378b1
commit
fe517a7a58
@ -798,6 +798,10 @@ INTERNAL int ultracode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
char tilepat[6];
|
||||
int tilex, tiley;
|
||||
int dcc;
|
||||
#ifdef _MSC_VER
|
||||
int* data_codewords;
|
||||
char* pattern;
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
cw_memalloc = in_length * 2;
|
||||
if (cw_memalloc < 283) {
|
||||
@ -812,7 +816,7 @@ INTERNAL int ultracode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
#ifndef _MSC_VER
|
||||
int data_codewords[cw_memalloc];
|
||||
#else
|
||||
int* data_codewords = (int *) _alloca(cw_memalloc * sizeof (int));
|
||||
data_codewords = (int *) _alloca(cw_memalloc * sizeof (int));
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
data_cw_count = ultra_generate_codewords(symbol, source, in_length, data_codewords);
|
||||
@ -914,7 +918,7 @@ INTERNAL int ultracode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
#ifndef _MSC_VER
|
||||
char pattern[total_height * total_width];
|
||||
#else
|
||||
char* pattern = (char *) _alloca(total_height * toal_width * sizeof (char));
|
||||
pattern = (char *) _alloca(total_height * total_width * sizeof (char));
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
for (i = 0; i < (total_height * total_width); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user