Commit 0012c26f authored by Alexandre Julliard's avatar Alexandre Julliard

windowscodecs: Build with msvcrt.

parent 769d88a3
......@@ -4,6 +4,8 @@ IMPORTS = windowscodecs uuid ole32 oleaut32 propsys rpcrt4 shlwapi user32 gdi3
EXTRAINCL = $(JPEG_CFLAGS) $(PNG_CFLAGS) $(TIFF_CFLAGS)
EXTRALIBS = $(APPLICATIONSERVICES_LIBS)
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
bitmap.c \
bmpdecode.c \
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <math.h>
......
......@@ -26,9 +26,6 @@
* A cube map array is equivalent to a 2D texture array which has cubeCount*6 textures.
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define NONAMELESSUNION
......
......@@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define NONAMELESSUNION
......
......@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......@@ -31,7 +29,6 @@
#include "wincodecs_private.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "wine/rbtree.h"
#include "wine/heap.h"
......@@ -612,7 +609,7 @@ static void read_bitmap_patterns(BitmapDecoderInfo *info)
for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
{
snprintfW(subkeyname, 11, uintformatW, i);
swprintf(subkeyname, 11, uintformatW, i);
res = RegOpenKeyExW(patternskey, subkeyname, 0, KEY_READ, &patternkey);
if (res != ERROR_SUCCESS) break;
......@@ -648,7 +645,7 @@ static void read_bitmap_patterns(BitmapDecoderInfo *info)
for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
{
snprintfW(subkeyname, 11, uintformatW, i);
swprintf(subkeyname, 11, uintformatW, i);
res = RegOpenKeyExW(patternskey, subkeyname, 0, KEY_READ, &patternkey);
if (res != ERROR_SUCCESS) break;
......@@ -1423,7 +1420,7 @@ static HRESULT WINAPI PixelFormatInfo_GetChannelMask(IWICPixelFormatInfo2 *iface
if (SUCCEEDED(hr))
{
snprintfW(valuename, 11, uintformatW, uiChannelIndex);
swprintf(valuename, 11, uintformatW, uiChannelIndex);
cbData = cbMaskBuffer;
......@@ -1903,7 +1900,7 @@ static void read_metadata_patterns(MetadataReaderInfo *info, GUID *container_gui
for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
{
snprintfW(subkeyname, 11, uintformatW, i);
swprintf(subkeyname, 11, uintformatW, i);
res = RegOpenKeyExW(guid_key, subkeyname, 0, KEY_READ, &patternkey);
if (res != ERROR_SUCCESS) break;
......@@ -1938,7 +1935,7 @@ static void read_metadata_patterns(MetadataReaderInfo *info, GUID *container_gui
for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
{
snprintfW(subkeyname, 11, uintformatW, i);
swprintf(subkeyname, 11, uintformatW, i);
res = RegOpenKeyExW(guid_key, subkeyname, 0, KEY_READ, &patternkey);
if (res != ERROR_SUCCESS) break;
......
......@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
......
......@@ -17,9 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <wchar.h>
#define COBJMACROS
#define NONAMELESSUNION
......@@ -201,7 +200,7 @@ static HRESULT get_token(struct string_t *elem, PROPVARIANT *id, PROPVARIANT *sc
if (start[1] < '0' || start[1] > '9') return DISP_E_TYPEMISMATCH;
*idx = strtolW(start + 1, &idx_end, 10);
*idx = wcstol(start + 1, &idx_end, 10);
if (idx_end > elem->str + elem->len) return WINCODEC_ERR_INVALIDQUERYREQUEST;
if (*idx_end != ']') return WINCODEC_ERR_INVALIDQUERYREQUEST;
if (*idx < 0) return WINCODEC_ERR_INVALIDQUERYREQUEST;
......@@ -225,7 +224,7 @@ static HRESULT get_token(struct string_t *elem, PROPVARIANT *id, PROPVARIANT *sc
VARTYPE vt;
PROPVARIANT next_token;
end = memchrW(start + 1, '=', elem->len - 1);
end = wmemchr(start + 1, '=', elem->len - 1);
if (!end) return WINCODEC_ERR_INVALIDQUERYREQUEST;
if (end > elem->str + elem->len) return WINCODEC_ERR_INVALIDQUERYREQUEST;
......@@ -312,10 +311,10 @@ static HRESULT get_token(struct string_t *elem, PROPVARIANT *id, PROPVARIANT *sc
return S_OK;
}
end = memchrW(start, '/', elem->len);
end = wmemchr(start, '/', elem->len);
if (!end) end = start + elem->len;
p = memchrW(start, ':', end - start);
p = wmemchr(start, ':', end - start);
if (p)
{
next_elem.str = p + 1;
......@@ -885,7 +884,7 @@ static const WCHAR *map_shortname_to_schema(const GUID *format, const WCHAR *nam
for (i = 0; i < ARRAY_SIZE(name2schema); i++)
{
if (!lstrcmpW(name2schema[i].name, name))
if (!wcscmp(name2schema[i].name, name))
return name2schema[i].schema;
}
......@@ -910,7 +909,7 @@ HRESULT WINAPI WICMapSchemaToName(REFGUID format, LPWSTR schema, UINT len, WCHAR
for (i = 0; i < ARRAY_SIZE(name2schema); i++)
{
if (!lstrcmpW(name2schema[i].schema, schema))
if (!wcscmp(name2schema[i].schema, schema))
{
if (name)
{
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -17,9 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define NONAMELESSUNION
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......@@ -26,7 +24,6 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wine/unicode.h"
#include "wincodecs_private.h"
......@@ -117,7 +114,7 @@ static LONG find_item(PropertyBag *This, LPCOLESTR name)
for (i=0; i < This->prop_count; i++)
{
if (strcmpW(name, This->properties[i].pstrName) == 0)
if (wcscmp(name, This->properties[i].pstrName) == 0)
return i;
}
......@@ -220,11 +217,11 @@ static HRESULT copy_propbag2(PROPBAG2 *dest, const PROPBAG2 *src)
dest->dwHint = src->dwHint;
dest->dwType = src->dwType;
dest->vt = src->vt;
dest->pstrName = CoTaskMemAlloc((strlenW(src->pstrName)+1) * sizeof(WCHAR));
dest->pstrName = CoTaskMemAlloc((lstrlenW(src->pstrName)+1) * sizeof(WCHAR));
if(!dest->pstrName)
return E_OUTOFMEMORY;
strcpyW(dest->pstrName, src->pstrName);
lstrcpyW(dest->pstrName, src->pstrName);
return S_OK;
}
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -31,7 +31,6 @@
#include "ocidl.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wincodecs_private.h"
......@@ -307,7 +306,7 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
{
HKEY pattern_key;
static const WCHAR int_format[] = {'%','i',0};
snprintfW(buf, 39, int_format, i);
swprintf(buf, 39, int_format, i);
res = RegCreateKeyExW(patterns_key, buf, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
if (res != ERROR_SUCCESS) break;
......@@ -853,7 +852,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
{
HKEY pattern_key;
static const WCHAR int_format[] = {'%','i',0};
snprintfW(buf, 39, int_format, i);
swprintf(buf, 39, int_format, i);
res = RegCreateKeyExW(format_key, buf, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
if (res != ERROR_SUCCESS) break;
......@@ -1044,7 +1043,7 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
for (i=0; i < list->channelcount; i++)
{
sprintfW(mask_valuename, valuename_format, i);
swprintf(mask_valuename, ARRAY_SIZE(mask_valuename), valuename_format, i);
res = RegSetValueExW(masks_key, mask_valuename, 0, REG_BINARY,
list->channelmasks[i], mask_size);
if (res != ERROR_SUCCESS) break;
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define COBJMACROS
......
......@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define NONAMELESSUNION
......
......@@ -23,7 +23,6 @@
#include "wincodecsdk.h"
#include "wine/debug.h"
#include "wine/unicode.h"
DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0x49,0x45,0xd3,0x04);
......@@ -238,7 +237,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
WCHAR *dst;
SIZE_T len;
if (!src) return NULL;
len = (strlenW(src) + 1) * sizeof(WCHAR);
len = (lstrlenW(src) + 1) * sizeof(WCHAR);
if ((dst = HeapAlloc(GetProcessHeap(), 0, len))) memcpy(dst, src, len);
return dst;
}
......@@ -277,7 +276,7 @@ struct decoder_frame
CLSID pixel_format;
UINT width, height;
UINT bpp;
double dpix, dpiy;
DOUBLE dpix, dpiy;
DWORD num_color_contexts;
DWORD num_colors;
WICColor palette[256];
......@@ -371,7 +370,7 @@ struct encoder_frame
UINT width, height;
UINT bpp;
BOOL indexed;
double dpix, dpiy;
DOUBLE dpix, dpiy;
DWORD num_colors;
WICColor palette[256];
/* encoder options */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment