Commit 1a4163b6 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

powershell: Read input command from stdin.

parent 75fa35ad
...@@ -24,10 +24,25 @@ int __cdecl wmain(int argc, WCHAR *argv[]) ...@@ -24,10 +24,25 @@ int __cdecl wmain(int argc, WCHAR *argv[])
{ {
int i; int i;
WINE_FIXME("stub:"); WINE_FIXME("stub.\n");
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
WINE_FIXME(" %s", wine_dbgstr_w(argv[i])); {
WINE_FIXME("\n"); WINE_FIXME("argv[%d] %s\n", i, wine_dbgstr_w(argv[i]));
if (!wcsicmp(argv[i], L"-command") && i < argc - 1 && !wcscmp(argv[i + 1], L"-"))
{
char command[4096], *p;
++i;
while (fgets(command, sizeof(command), stdin))
{
WINE_FIXME("command %s.\n", debugstr_a(command));
p = command;
while (*p && !isspace(*p)) ++p;
*p = 0;
if (!stricmp(command, "exit"))
break;
}
}
}
return 0; return 0;
} }
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