mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Make zint compile on MS-VC6. Adopt makefiles to new file list.
This commit is contained in:
parent
5fe97772cb
commit
045a9e3b00
@ -171,7 +171,7 @@ static void define_mode(unsigned int gbdata[], const size_t length, char* mode,
|
||||
#ifndef _MSC_VER
|
||||
char char_modes[length][GM_NUM_MODES];
|
||||
#else
|
||||
char* char_modes = (char*) _alloca(length * GM_NUM_MODES);
|
||||
char** char_modes = (char**) _alloca(length * GM_NUM_MODES);
|
||||
#endif
|
||||
memset(char_modes, 0, length * GM_NUM_MODES);
|
||||
|
||||
|
29
backend/qr.c
29
backend/qr.c
@ -513,6 +513,22 @@ static void qr_binary(unsigned char datastream[], const int version, const int t
|
||||
/* Split data into blocks, add error correction and then interleave the blocks and error correction data */
|
||||
static void add_ecc(unsigned char fullstream[], const unsigned char datastream[], const int version, const int data_cw, const int blocks, int debug) {
|
||||
int ecc_cw;
|
||||
int short_data_block_length;
|
||||
int qty_long_blocks;
|
||||
int qty_short_blocks;
|
||||
int ecc_block_length;
|
||||
int i, j, length_this_block, posn;
|
||||
#ifdef _MSC_VER
|
||||
unsigned char* data_block;
|
||||
unsigned char* ecc_block;
|
||||
unsigned char* interleaved_data;
|
||||
unsigned char* interleaved_ecc;
|
||||
#endif
|
||||
|
||||
short_data_block_length = data_cw / blocks;
|
||||
qty_long_blocks = data_cw % blocks;
|
||||
qty_short_blocks = blocks - qty_long_blocks;
|
||||
ecc_block_length = ecc_cw / blocks;
|
||||
|
||||
if (version < RMQR_VERSION) {
|
||||
ecc_cw = qr_total_codewords[version - 1] - data_cw;
|
||||
@ -520,11 +536,6 @@ static void add_ecc(unsigned char fullstream[], const unsigned char datastream[]
|
||||
ecc_cw = rmqr_total_codewords[version - RMQR_VERSION] - data_cw;
|
||||
}
|
||||
|
||||
int short_data_block_length = data_cw / blocks;
|
||||
int qty_long_blocks = data_cw % blocks;
|
||||
int qty_short_blocks = blocks - qty_long_blocks;
|
||||
int ecc_block_length = ecc_cw / blocks;
|
||||
int i, j, length_this_block, posn;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
unsigned char data_block[short_data_block_length + 2];
|
||||
@ -532,10 +543,10 @@ static void add_ecc(unsigned char fullstream[], const unsigned char datastream[]
|
||||
unsigned char interleaved_data[data_cw + 2];
|
||||
unsigned char interleaved_ecc[ecc_cw + 2];
|
||||
#else
|
||||
unsigned char* data_block = (unsigned char *) _alloca(short_data_block_length + 2);
|
||||
unsigned char* ecc_block = (unsigned char *) _alloca(ecc_block_length + 2);
|
||||
unsigned char* interleaved_data = (unsigned char *) _alloca(data_cw + 2);
|
||||
unsigned char* interleaved_ecc = (unsigned char *) _alloca(ecc_cw + 2);
|
||||
data_block = (unsigned char *) _alloca(short_data_block_length + 2);
|
||||
ecc_block = (unsigned char *) _alloca(ecc_block_length + 2);
|
||||
interleaved_data = (unsigned char *) _alloca(data_cw + 2);
|
||||
interleaved_ecc = (unsigned char *) _alloca(ecc_cw + 2);
|
||||
#endif
|
||||
|
||||
posn = 0;
|
||||
|
@ -109,7 +109,6 @@ SOURCES += ../backend/2of5.c \
|
||||
../backend/ps.c \
|
||||
../backend/raster.c \
|
||||
../backend/reedsol.c \
|
||||
../backend/render.c \
|
||||
../backend/rss.c \
|
||||
../backend/sjis.c \
|
||||
../backend/svg.c \
|
||||
|
@ -84,6 +84,8 @@ TEA_ADD_SOURCES([
|
||||
../backend/dmatrix.c
|
||||
../backend/dotcode.c
|
||||
../backend/eci.c
|
||||
../backend/gb2312.c
|
||||
../backend/general_field.c
|
||||
../backend/gif.c
|
||||
../backend/gridmtx.c
|
||||
../backend/gs1.c
|
||||
@ -91,6 +93,7 @@ TEA_ADD_SOURCES([
|
||||
../backend/imail.c
|
||||
../backend/large.c
|
||||
../backend/library.c
|
||||
../backend/mailmark.c
|
||||
../backend/maxicode.c
|
||||
../backend/medical.c
|
||||
../backend/pcx.c
|
||||
@ -102,8 +105,8 @@ TEA_ADD_SOURCES([
|
||||
../backend/qr.c
|
||||
../backend/raster.c
|
||||
../backend/reedsol.c
|
||||
../backend/render.c
|
||||
../backend/rss.c
|
||||
../backend/sjis.c
|
||||
../backend/svg.c
|
||||
../backend/telepen.c
|
||||
../backend/tif.c
|
||||
|
@ -240,10 +240,6 @@ SOURCE=..\backend\reedsol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\render.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\backend\rss.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -28,13 +28,14 @@ FORMS += extData.ui \
|
||||
grpDBExtend.ui \
|
||||
grpDM.ui \
|
||||
grpGrid.ui \
|
||||
grpHX.ui \
|
||||
grpMaxicode.ui \
|
||||
grpMicroPDF.ui \
|
||||
grpMQR.ui \
|
||||
grpMSICheck.ui \
|
||||
grpPDF417.ui \
|
||||
grpQR.ui \
|
||||
grpHX.ui \
|
||||
grpRMQR.ui \
|
||||
mainWindow.ui \
|
||||
grpDotCode.ui
|
||||
|
||||
|
@ -248,10 +248,6 @@ SOURCE=..\..\backend\reedsol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\backend\render.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\backend\rss.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
Loading…
Reference in New Issue
Block a user