wordpad: Open the filename passed on command line if any.
This commit is contained in:
parent
09c6bf415f
commit
2cf1925eb4
|
@ -1041,24 +1041,27 @@ static void HandleCommandLine(LPWSTR cmdline)
|
|||
while (*cmdline && *cmdline != delimiter) cmdline++;
|
||||
if (*cmdline == delimiter) cmdline++;
|
||||
|
||||
while (*cmdline == ' ' || *cmdline == '-' || *cmdline == '/')
|
||||
while (*cmdline)
|
||||
{
|
||||
WCHAR option;
|
||||
while (isspace(*cmdline)) cmdline++;
|
||||
|
||||
if (*cmdline++ == ' ') continue;
|
||||
|
||||
option = *cmdline;
|
||||
if (option) cmdline++;
|
||||
while (*cmdline == ' ') cmdline++;
|
||||
|
||||
switch (option)
|
||||
if (*cmdline == '-' || *cmdline == '/')
|
||||
{
|
||||
if (!cmdline[2] || isspace(cmdline[2]))
|
||||
{
|
||||
switch (cmdline[1])
|
||||
{
|
||||
case 'p':
|
||||
case 'P':
|
||||
case 'p':
|
||||
opt_print = 1;
|
||||
break;
|
||||
cmdline += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/* a filename starting by / */
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (*cmdline)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue