mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Windows: cast _allocas/mallocs, update DLL version, props Pierre Y.
This commit is contained in:
parent
a775e66f3f
commit
34d3319cc6
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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*/
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user