[PATCH 7/9] CMD.exe: Change from main to wmain
Jason Edmeades
jason.edmeades at googlemail.com
Sun Jun 3 16:07:45 CDT 2007
Simplifies the processing at the start of the program slightly
---
programs/cmd/Makefile.in | 2 +-
programs/cmd/wcmdmain.c | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/programs/cmd/Makefile.in b/programs/cmd/Makefile.in
index c383344..c4e4223 100644
--- a/programs/cmd/Makefile.in
+++ b/programs/cmd/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = cmd.exe
-APPMODE = -mconsole
+APPMODE = -mconsole -municode
EXTRADEFS = -DUNICODE
IMPORTS = shell32 user32 advapi32 kernel32
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 6fc4135..f1e0383 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -100,9 +100,8 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start);
* winmain().
*/
-int main (int argc, char *argv[])
+int wmain (int argc, WCHAR *argvW[])
{
- LPWSTR *argvW = NULL;
int args;
WCHAR *cmd = NULL;
WCHAR string[1024];
@@ -121,10 +120,7 @@ int main (int argc, char *argv[])
wsprintf(version_string, WCMD_LoadMessage(WCMD_VERSION), string);
strcpyW(anykey, WCMD_LoadMessage(WCMD_ANYKEY));
- /* Get a Unicode command line */
- argvW = CommandLineToArgvW( GetCommandLineW(), &argc );
args = argc;
-
opt_c=opt_k=opt_q=opt_s=0;
while (args > 0)
{
--
1.5.0
More information about the wine-patches
mailing list