diff --git a/dlls/windowscodecs/Makefile.in b/dlls/windowscodecs/Makefile.in index 774257f11c7..80e4d16c9d4 100644 --- a/dlls/windowscodecs/Makefile.in +++ b/dlls/windowscodecs/Makefile.in @@ -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 \ diff --git a/dlls/windowscodecs/bitmap.c b/dlls/windowscodecs/bitmap.c index 3d7d775b34c..bd09c74941b 100644 --- a/dlls/windowscodecs/bitmap.c +++ b/dlls/windowscodecs/bitmap.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c index f5a2589d68a..a01dc78c616 100644 --- a/dlls/windowscodecs/bmpdecode.c +++ b/dlls/windowscodecs/bmpdecode.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include diff --git a/dlls/windowscodecs/bmpencode.c b/dlls/windowscodecs/bmpencode.c index 2f0c05a5df3..342f2c897e8 100644 --- a/dlls/windowscodecs/bmpencode.c +++ b/dlls/windowscodecs/bmpencode.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 21197993ca1..914e8ad52cd 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/colorcontext.c b/dlls/windowscodecs/colorcontext.c index eb13482cf43..239fd0fb2c3 100644 --- a/dlls/windowscodecs/colorcontext.c +++ b/dlls/windowscodecs/colorcontext.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/colortransform.c b/dlls/windowscodecs/colortransform.c index af66c67443d..e8065950bc6 100644 --- a/dlls/windowscodecs/colortransform.c +++ b/dlls/windowscodecs/colortransform.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index bc10a9eccc4..c321627885b 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index d0932767d6f..0830519fbc0 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -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 #define COBJMACROS diff --git a/dlls/windowscodecs/decoder.c b/dlls/windowscodecs/decoder.c index 0e97135bc16..3e43fa91114 100644 --- a/dlls/windowscodecs/decoder.c +++ b/dlls/windowscodecs/decoder.c @@ -16,9 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #define NONAMELESSUNION diff --git a/dlls/windowscodecs/encoder.c b/dlls/windowscodecs/encoder.c index 72a83822b50..869588baec1 100644 --- a/dlls/windowscodecs/encoder.c +++ b/dlls/windowscodecs/encoder.c @@ -16,9 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #define NONAMELESSUNION diff --git a/dlls/windowscodecs/fliprotate.c b/dlls/windowscodecs/fliprotate.c index 46402237eef..842c342af23 100644 --- a/dlls/windowscodecs/fliprotate.c +++ b/dlls/windowscodecs/fliprotate.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 5d5a3a07a24..8ebba7b5a88 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index d2a6196cd07..391880be4bc 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index 0ad8bc6ee15..df180681af1 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index 0a86266396a..34e14087f94 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #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; diff --git a/dlls/windowscodecs/main.c b/dlls/windowscodecs/main.c index bfdde3e3891..e78acc3f34f 100644 --- a/dlls/windowscodecs/main.c +++ b/dlls/windowscodecs/main.c @@ -18,7 +18,6 @@ #define COBJMACROS -#include "config.h" #include diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index cdd74209011..fc67ad8bf91 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include diff --git a/dlls/windowscodecs/metadataquery.c b/dlls/windowscodecs/metadataquery.c index 79340427547..189187fb2ab 100644 --- a/dlls/windowscodecs/metadataquery.c +++ b/dlls/windowscodecs/metadataquery.c @@ -17,9 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include +#include #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) { diff --git a/dlls/windowscodecs/palette.c b/dlls/windowscodecs/palette.c index f99cbe00fd1..34329717201 100644 --- a/dlls/windowscodecs/palette.c +++ b/dlls/windowscodecs/palette.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index b5ea9b48861..d14490560aa 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -17,9 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #define NONAMELESSUNION diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c index e9d1af9670d..71b26309140 100644 --- a/dlls/windowscodecs/propertybag.c +++ b/dlls/windowscodecs/propertybag.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #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; } diff --git a/dlls/windowscodecs/proxy.c b/dlls/windowscodecs/proxy.c index 34b618e8d91..35d67db1e3e 100644 --- a/dlls/windowscodecs/proxy.c +++ b/dlls/windowscodecs/proxy.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index 365f44979fc..2fb03a2e1e9 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -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; diff --git a/dlls/windowscodecs/scaler.c b/dlls/windowscodecs/scaler.c index d6e56d096ea..cb4490c8136 100644 --- a/dlls/windowscodecs/scaler.c +++ b/dlls/windowscodecs/scaler.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c index b572d8f6867..7d76582c0fb 100644 --- a/dlls/windowscodecs/tgaformat.c +++ b/dlls/windowscodecs/tgaformat.c @@ -16,9 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #define COBJMACROS diff --git a/dlls/windowscodecs/unix_iface.c b/dlls/windowscodecs/unix_iface.c index 1f5dec9a6c4..6d7876792a4 100644 --- a/dlls/windowscodecs/unix_iface.c +++ b/dlls/windowscodecs/unix_iface.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #define NONAMELESSUNION diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index ebd2d20dfe7..3b20f7d6c24 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -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 */