Nikolay Sivov nsivov@codeweavers.com wrote:
+char* CDECL _get_narrow_winmain_command_line(void) +{
- static char *narrow_command_line;
- char *s;
- if (narrow_command_line)
return narrow_command_line;
- s = GetCommandLineA();
- if (*s == '"')
- {
/* skip all leading quotes */
while (*++s == '"')
;
/* skip everything up to next quote */
while (*s && *s++ != '"')
;
- }
- else
- {
while (*s && *s != ' ' && *s != '\t')
{
/* allow embedded quoted blocks */
if (*s == '"')
{
s++;
while (*s && *s++ != '"')
;
}
else
s++;
}
- }
- while (*s == ' ' || *s == '\t')
s++;
- return narrow_command_line = s;
+}
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?