Make command line version compile with MS-VC6 and QT-Version with MS-VC8

This commit is contained in:
Harald Oehlmann 2015-08-18 13:50:42 +02:00
parent 2e5fe31ebf
commit b7b7564457
14 changed files with 198 additions and 52 deletions

View file

@ -679,6 +679,8 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length)
unsigned char local_source[length + 1];
#else
unsigned char* local_source = (unsigned char*)_alloca(length + 1);
unsigned int* data_part;
unsigned int* ecc_part;
#endif
memset(binary_string,0,20000);
@ -1014,8 +1016,8 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length)
#ifndef _MSC_VER
unsigned int data_part[data_blocks + 3], ecc_part[ecc_blocks + 3];
#else
unsigned int* data_part = (unsigned int*)_alloca((data_blocks + 3) * sizeof(unsigned int));
unsigned int* ecc_part = (unsigned int*)_alloca((ecc_blocks + 3) * sizeof(unsigned int));
data_part = (unsigned int*)_alloca((data_blocks + 3) * sizeof(unsigned int));
ecc_part = (unsigned int*)_alloca((ecc_blocks + 3) * sizeof(unsigned int));
#endif
/* Copy across data into separate integers */
memset(data_part,0,(data_blocks + 2)*sizeof(int));