SpiritQuaddicted/reQuiem — pull request #20 by neogeographica (2014-04-27 06:05:05+00:00)
Title: support spaces in command-line args

On modern Windows systems, any arg that is a path value is somewhat likely to have spaces in it.

Linux and SDL frontends for Quake tend to handle these correctly, but various Windows-native Quake frontends don't really. Let's fix it here!

The main change is in WinMain in sys_win.c, to make sure we interpret the argument tokens from the command line correctly. See the code comments for more details.

COM_InitArgv in common.c needs an ancillary change, to properly show arguments-with-spaces in the constructed "cmdline" console variable. Also make sure to properly backslash any quote characters, or backslash characters that aren't already inside quotes.