Commit 2cf1925e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

wordpad: Open the filename passed on command line if any.

parent 09c6bf41
...@@ -1041,24 +1041,27 @@ static void HandleCommandLine(LPWSTR cmdline) ...@@ -1041,24 +1041,27 @@ static void HandleCommandLine(LPWSTR cmdline)
while (*cmdline && *cmdline != delimiter) cmdline++; while (*cmdline && *cmdline != delimiter) cmdline++;
if (*cmdline == delimiter) cmdline++; if (*cmdline == delimiter) cmdline++;
while (*cmdline == ' ' || *cmdline == '-' || *cmdline == '/') while (*cmdline)
{ {
WCHAR option; while (isspace(*cmdline)) cmdline++;
if (*cmdline++ == ' ') continue; if (*cmdline == '-' || *cmdline == '/')
{
option = *cmdline; if (!cmdline[2] || isspace(cmdline[2]))
if (option) cmdline++; {
while (*cmdline == ' ') cmdline++; switch (cmdline[1])
switch (option)
{ {
case 'p':
case 'P': case 'P':
case 'p':
opt_print = 1; opt_print = 1;
break; cmdline += 2;
continue;
} }
} }
/* a filename starting by / */
}
break;
}
if (*cmdline) if (*cmdline)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment