Make compile with ms-vc6 (zint, tcl) and VS2015 (qzint)

This commit is contained in:
Harald Oehlmann 2019-11-17 19:30:55 +01:00
parent 1fa7f2b804
commit 23ec0d48fc
6 changed files with 27 additions and 1993 deletions

View File

@ -75,16 +75,22 @@ int gs1_verify(struct zint_symbol *symbol, const unsigned char source[], const s
char ai_string[7]; /* 6 char max "(NNNN)" */ char ai_string[7]; /* 6 char max "(NNNN)" */
int bracket_level, max_bracket_level, ai_length, max_ai_length, min_ai_length; int bracket_level, max_bracket_level, ai_length, max_ai_length, min_ai_length;
int ai_count; int ai_count;
int error_latch;
#ifdef _MSC_VER
int *ai_value;
int *ai_location;
int *data_location;
int *data_length;
#endif
int ai_max = ustrchr_cnt(source, src_len, '[') + 1; /* Plus 1 so non-zero */ int ai_max = ustrchr_cnt(source, src_len, '[') + 1; /* Plus 1 so non-zero */
#ifndef _MSC_VER #ifndef _MSC_VER
int ai_value[ai_max], ai_location[ai_max], data_location[ai_max], data_length[ai_max]; int ai_value[ai_max], ai_location[ai_max], data_location[ai_max], data_length[ai_max];
#else #else
int ai_value = (int*) _alloca(ai_max * sizeof(int)); ai_value = (int*) _alloca(ai_max * sizeof(int));
int ai_location = (int*) _alloca(ai_max * sizeof(int)); ai_location = (int*) _alloca(ai_max * sizeof(int));
int data_location = (int*) _alloca(ai_max * sizeof(int)); data_location = (int*) _alloca(ai_max * sizeof(int));
int data_length = (int*) _alloca(ai_max * sizeof(int)); data_length = (int*) _alloca(ai_max * sizeof(int));
#endif #endif
int error_latch;
/* Detect extended ASCII characters */ /* Detect extended ASCII characters */
for (i = 0; i < src_len; i++) { for (i = 0; i < src_len; i++) {

View File

@ -91,15 +91,20 @@ int svg_plot(struct zint_symbol *symbol) {
const char *locale = NULL; const char *locale = NULL;
float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy; float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
float radius; float radius;
int i;
struct zint_vector_rect *rect; struct zint_vector_rect *rect;
struct zint_vector_hexagon *hex; struct zint_vector_hexagon *hex;
struct zint_vector_circle *circle; struct zint_vector_circle *circle;
struct zint_vector_string *string; struct zint_vector_string *string;
#ifdef _MSC_VER
char* html_string;
#endif
int html_len = strlen((char *)symbol->text) + 1; int html_len = strlen((char *)symbol->text) + 1;
for (int i = 0; i < strlen((char *)symbol->text); i++) { for (0; i < strlen((char *)symbol->text); i++) {
switch(symbol->text[i]) { switch(symbol->text[i]) {
case '>': case '>':
case '<': case '<':
@ -114,7 +119,7 @@ int svg_plot(struct zint_symbol *symbol) {
#ifndef _MSC_VER #ifndef _MSC_VER
char html_string[html_len]; char html_string[html_len];
#else #else
char* html_string = (unsigned char*) _alloca(html_len); html_string = (char*) _alloca(html_len);
#endif #endif
/* Check for no created vector set */ /* Check for no created vector set */

View File

@ -89,6 +89,7 @@ SOURCES += ../backend/2of5.c \
../backend/dotcode.c \ ../backend/dotcode.c \
../backend/eci.c \ ../backend/eci.c \
../backend/emf.c \ ../backend/emf.c \
../backend/general_field.c \
../backend/gif.c \ ../backend/gif.c \
../backend/gridmtx.c \ ../backend/gridmtx.c \
../backend/gs1.c \ ../backend/gs1.c \

View File

@ -156,6 +156,10 @@ SOURCE=..\backend\emf.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\backend\general_field.c
# End Source File
# Begin Source File
SOURCE=..\backend\gif.c SOURCE=..\backend\gif.c
# End Source File # End Source File
# Begin Source File # Begin Source File

File diff suppressed because one or more lines are too long

View File

@ -152,6 +152,10 @@ SOURCE=..\..\backend\emf.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\backend\general_field.c
# End Source File
# Begin Source File
SOURCE=..\..\frontend\getopt.c SOURCE=..\..\frontend\getopt.c
# End Source File # End Source File
# Begin Source File # Begin Source File