Wed, 31 Jul 2019 11:34:00 -0500cmake: Fix locating libusb header at configure-time
Andrew Eikum <aeikum@codeweavers.com> [Wed, 31 Jul 2019 11:34:00 -0500] rev 12971
cmake: Fix locating libusb header at configure-time

Removing the CheckUSBHID call is necessary to avoid caching the failed header
check result before we find libusb via pkg-config.

Wed, 31 Jul 2019 19:40:50 +0300minor whitespace tidy-up.
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 19:40:50 +0300] rev 12970
minor whitespace tidy-up.

Wed, 31 Jul 2019 09:11:20 -0700Fixed bug 4692 - Command line parsing
Sam Lantinga <slouken@libsdl.org> [Wed, 31 Jul 2019 09:11:20 -0700] rev 12969
Fixed bug 4692 - Command line parsing

Galadrim

As I have seen, SDL implements its own command line parser for Windows in SDL_windows_main.c. Unfortunately, it doesn't seem to allow command line arguments with trailing backslashes if quoting is required.

Usually, when you write an application that gets command line arguments passed as argc and argv, the parsing is done by parse_cmdline. The Windows API also provides the function CommandLineToArgvW, so an application can parse itself if only the command line string is provided. Both functions behave almost identically according to their documentation. If the argument "\\" (including the quotes) is passed, they both turn it into a single backslash.

The SDL command line parser on the other hand doesn't recognize the second quote character as the closing character in this example and therefore includes it in the parsed argument. The parser does not count the number of backslashes preceding a quote. It always treats a quote as escaped if a backslash is in front of it. Therefore, it should be impossible to quote and escape an argument correctly, if it has a trailing backslash and contains characters that require quoting.

Of course, each application is allowed to implement its own parsing rules, so SDL is free to do so. But the problem I see is that there are arguments, that are impossible to be passed to the parser correctly, as I described above. Is there a reason, why SDL does not simply use CommandLineToArgvW instead of implementing its own parser?

Here are some links that show that correct argument parsing, as it is usually done in Windows, is quite complicated:

https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw

http://www.windowsinspired.com/how-a-windows-programs-splits-its-command-line-into-individual-arguments/

Wed, 31 Jul 2019 05:11:40 +0300use SDL_zeroa at more places where the argument is an array.
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 05:11:40 +0300] rev 12968
use SDL_zeroa at more places where the argument is an array.

Wed, 31 Jul 2019 03:02:28 +0300minor build fixes. SDL-1.2
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 03:02:28 +0300] rev 12967
minor build fixes.

Wed, 31 Jul 2019 01:22:02 +0300Fix bug 4746 - introduce SDL_zeroa macro.
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 01:22:02 +0300] rev 12966
Fix bug 4746 - introduce SDL_zeroa macro.

Wed, 31 Jul 2019 01:19:26 +0300minor build fix.
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 01:19:26 +0300] rev 12965
minor build fix.

Wed, 31 Jul 2019 00:10:00 +0300MS_ADPCM_Decode: fix assigning an array to a pointer (lose '&').
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 00:10:00 +0300] rev 12964
MS_ADPCM_Decode: fix assigning an array to a pointer (lose '&').

Wed, 31 Jul 2019 00:07:15 +0300better readability..
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 00:07:15 +0300] rev 12963
better readability..

Wed, 31 Jul 2019 00:06:50 +0300SDL_iconv_string: add (char*) casts before SDL_malloc() calls.
Ozkan Sezer <sezeroz@gmail.com> [Wed, 31 Jul 2019 00:06:50 +0300] rev 12962
SDL_iconv_string: add (char*) casts before SDL_malloc() calls.