Merge Windows platform patches by tgotic

This commit is contained in:
hooper114 2009-06-02 20:23:38 +00:00
parent f121cf65ac
commit b65cd26527
33 changed files with 1093 additions and 129 deletions

View file

@ -22,7 +22,11 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef _MSC_VER
#include <malloc.h>
#endif
#include "common.h"
#include "gs1.h"
/* This code does some checks on the integrity of GS1 data. It is not intended
to be bulletproof, nor does it report very accurately what problem was found
@ -257,7 +261,11 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[
int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], unsigned char reduced[])
{
/* Only to keep the compiler happy */
#ifndef _MSC_VER
char temp[ustrlen(source) + 5];
#else
char* temp = (char*)_alloca(ustrlen(source) + 5);
#endif
int error_number, i;
error_number = gs1_verify(symbol, source, temp);