Windows: cast _allocas/mallocs, update DLL version, props Pierre Y.

This commit is contained in:
gitlost 2020-06-15 16:06:11 +01:00
parent a775e66f3f
commit 34d3319cc6
6 changed files with 11 additions and 11 deletions

View File

@ -55,7 +55,7 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
data_offset = sizeof (bitmap_file_header_t) + sizeof (bitmap_info_header_t);
file_size = data_offset + data_size;
bitmap_file_start = malloc(file_size);
bitmap_file_start = (unsigned char *) malloc(file_size);
if (bitmap_file_start == NULL) {
strcpy(symbol->errtxt, "602: Out of memory");
return ZINT_ERROR_MEMORY;

View File

@ -20,11 +20,11 @@ HRESULT DllGetVersion (DLLVERSIONINFO2* pdvi)
return (E_INVALIDARG);
pdvi->info1.dwMajorVersion = 2;
pdvi->info1.dwMinorVersion = 2;
pdvi->info1.dwMinorVersion = 8;
pdvi->info1.dwBuildNumber = 1;
pdvi->info1.dwPlatformID = DLLVER_PLATFORM_WINDOWS;
if (sizeof(DLLVERSIONINFO2) == pdvi->info1.cbSize)
pdvi->ullVersion = MAKEDLLVERULL(2, 2, 1, 0);
pdvi->ullVersion = MAKEDLLVERULL(2, 8, 1, 0);
return S_OK;
}

View File

@ -309,7 +309,7 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
#ifndef _MSC_VER
char lzwoutbuf[lzoutbufSize];
#else
lzwoutbuf = _alloca(lzoutbufSize);
lzwoutbuf = (char *) _alloca(lzoutbufSize);
#endif /* _MSC_VER */
/* Open output file in binary mode */

View File

@ -280,7 +280,7 @@ INTERNAL void large_uchar_array(const large_int *t, unsigned char *uchar_array,
#ifndef _MSC_VER
unsigned int uint_array[size ? size : 1]; /* Avoid run-time warning if size is 0 */
#else
unsigned int *uint_array = _alloca((size ? size : 1) * sizeof(unsigned int));
unsigned int *uint_array = (unsigned int *) _alloca((size ? size : 1) * sizeof(unsigned int));
#endif
large_uint_array(t, uint_array, size, bits);

View File

@ -7,8 +7,8 @@ VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO
#endif
FILEVERSION 2,7,1,0
PRODUCTVERSION 2,7,1,0
FILEVERSION 2,8,1,0
PRODUCTVERSION 2,8,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@ -25,12 +25,12 @@ BEGIN
//language ID = U.S. English, char set = Windows, Multilingual
BEGIN
VALUE "FileDescription", "libzint barcode library\0"
VALUE "FileVersion", "2.7.1.0\0"
VALUE "FileVersion", "2.8.1.0\0"
VALUE "InternalName", "zint.dll\0"
VALUE "LegalCopyright", "Copyright © 2017 Robin Stuart & BogDan Vatra\0"
VALUE "LegalCopyright", "Copyright © 2020 Robin Stuart & BogDan Vatra\0"
VALUE "OriginalFilename", "zint.dll\0"
VALUE "ProductName", "libzint\0"
VALUE "ProductVersion", "2.7.1.0\0"
VALUE "ProductVersion", "2.8.1.0\0"
VALUE "License", "BSD License version 3\0"
VALUE "WWW", "http://www.sourceforge.net/projects/zint"
END

View File

@ -240,7 +240,7 @@ static void qr_cur_cost(unsigned int state[], const unsigned int jisdata[], cons
static void qr_define_mode(char mode[], const unsigned int jisdata[], const size_t length, const int gs1, const int version, const int debug) {
unsigned int state[11] = {
0 /*N*/, 0 /*A*/, 0 /*B*/, 0 /*K*/,
version, gs1,
(unsigned int) version, (unsigned int) gs1,
0 /*numeric_end*/, 0 /*numeric_cost*/, 0 /*alpha_end*/, 0 /*alpha_cost*/, 0 /*alpha_pcent*/
};