This fixes incorrect character display in the file name
in e.g., stats output from cwebp.exe in visual studio builds.
In mingw further changes will be needed as using %s in wfprintf() for
wchar_t pointers is a Microsoft extension that doesn't seem to be
supported with gcc -fms-extensions. %ls works, but will require updating
format strings and wrapping concatenations with TO_W_CHAR() as visual
studio will reject merging string constants of different width.
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode
Change-Id: I57d24c3815f7b5aa3971ac315c65c4458258d706
CommandLineToArgvW() returns a LPWSTR*, storing to const LPWSTR* is
incorrect without a cast; fixes gcc -Wincompatible-pointer-types
and clang(-cl) -Wincompatible-pointer-types-discads-qualifiers warnings
Change-Id: Iad5b49c4862c7be68251272e50d3c751099559bc
Define macros in examples/unicode.h to use Unicode argv
on Windows. Keep char everywhere on Unix since it handles
UTF-8 without any change.
Impact:
- All fopen () and SHCreateStreamOnFile(),
- All fprintf() printing file paths,
- All strcmp() used with "-",
- File path parsing,
- Gif reading.
Concerned executables from examples/ and extras/:
anim_diff, anim_dump, vwebp, vwebp_sdl,
cwebp, dwebp, gif2webp, img2webp,
webpmux, webpinfo, webp_quality, get_disto
When compiled on Windows with Unicode enabled, webpmux and
img2webp will not work when used with an argument file and
will print "Reading arguments from a file is a feature
unavailable with Unicode binaries."
BUG=webp:398
Change-Id: Ic55d222a3ce1a715f9c4cce57ecbe2705d5ce317