[v2 PATCH] ucrtbase: Implement _get_narrow_winmain_command_line/_get_wide_winmain_command_line

Piotr Caban piotr.caban at gmail.com
Wed Jul 27 09:52:36 CDT 2016


On 07/27/16 15:29, Dmitry Timoshkov wrote:
> Piotr Caban <piotr.caban at gmail.com> wrote:
>
>>> Once again:
>>> Where did you get an idea of such an implementation? Is this copied from
>>> some place or based on some other implementation? Why for instance simple
>>> 'return GetCommandLineA()' is not enough as an initial implementation?
>>
>> Probably I'm just stating obvious but the function skips executable name
>> from the command line. That's why returning what GetCommandLineA returns
>> is incorrect.
>
> From what documentation/description is that obvious? That's not a common
> practice to send patches for not very obvious things without any tests.
> Why this implementation treats specially tabs and spaces but not other
> white space characters? Is that also obvious? How about the tests for
> quotes/embedded quotes?
>
I was not asking Nikolay for the tests because I think it's not easy to 
write them. Some interesting tests needs executable name with ' ' in its 
name. I also don't like the idea of starting many processes just to test 
the function. On the other hand the initial test executable may be 
started in many different ways (like e.g. passing first argument quoted 
makes it impossible to check the return with simple comparison).

That doesn't mean that I'm against adding a test or 2 for that. Anyway I 
think this implementation is good after doing some tests myself.



More information about the wine-devel mailing list