1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

powershell: Read input command from stdin.

This commit is contained in:
Paul Gofman 2024-02-15 12:41:28 -06:00 committed by Alexandre Julliard
parent 75fa35ad7f
commit 1a4163b686

View File

@ -24,10 +24,25 @@ int __cdecl wmain(int argc, WCHAR *argv[])
{
int i;
WINE_FIXME("stub:");
WINE_FIXME("stub.\n");
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;
}