[PATCH] ucrtbase: Implement _get_narrow_winmain_command_line/_get_wide_winmain_command_line

Dmitry Timoshkov dmitry at baikal.ru
Sun Jul 24 21:24:48 CDT 2016


Nikolay Sivov <nsivov at 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 == '"')
> +  {
> +      s++;
> +      while (*s)
> +          if (*s++ == '"')
> +              break;
> +  }
> +  else
> +  {
> +      while (*s && *s != ' ' && *s != '\t')
> +          s++;
> +  }
> +  while (*s == ' ' || *s == '\t')
> +      s++;
> +
> +  return narrow_command_line = s;
> +}

Where did you get an idea of sucn an implementation?

-- 
Dmitry.



More information about the wine-devel mailing list