Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/programs/powershell/main.c
4389 views
1
/*
2
* Copyright 2017 Jactry Zeng for CodeWeavers
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17
*/
18
19
#include "wine/debug.h"
20
21
WINE_DEFAULT_DEBUG_CHANNEL(powershell);
22
23
int __cdecl wmain(int argc, WCHAR *argv[])
24
{
25
int i;
26
27
WINE_FIXME("stub.\n");
28
for (i = 0; i < argc; i++)
29
{
30
WINE_FIXME("argv[%d] %s\n", i, wine_dbgstr_w(argv[i]));
31
if (!wcsicmp(argv[i], L"-command") && i < argc - 1 && !wcscmp(argv[i + 1], L"-"))
32
{
33
char command[4096], *p;
34
35
++i;
36
while (fgets(command, sizeof(command), stdin))
37
{
38
WINE_FIXME("command %s.\n", debugstr_a(command));
39
p = command;
40
while (*p && !isspace(*p)) ++p;
41
*p = 0;
42
if (!stricmp(command, "exit"))
43
break;
44
}
45
}
46
}
47
return 0;
48
}
49
50