shellapi.h must be included after windows.h; fixes:
/Windows Kits/10/Include/10.0.26100.0/um/shellapi.h|68 col 1| error:
unknown type name 'EXTERN_C'
when building using VS 2022 after:
44257cb8 apply clang-format
Bug: 433996651
Change-Id: I8f340cdaf6d6b315f1b7535710847db786599da1
(Debian clang-format version 19.1.7 (3+build4)) with `--style=Google`.
Manual changes:
* clang-format disabled around macros with stringification (mostly
assembly)
* some inline assembly strings were adjusted to avoid awkward line
breaks
* trailing commas, `//` or suffixes (`ull`) added to help array
formatting
* thread_utils.c: parameter comments were changed to the more common
/*...=*/ style to improve formatting
The automatically generated code under swig/ was skipped.
Bug: 433996651
Change-Id: Iea3f24160d78d2a2653971cdf13fa932e47ff1b3
in calls to `LOCAL_FREE()`: `(W_CHAR** const) -> (W_CHAR**)`. This will
improve formatting when clang-format is applied.
Bug: 433996651
Change-Id: I54e62206c83473e9369b8c67fb8d6c44d7808d52
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