Jason Edmeades : xcopy.exe: Convert from main to wmain.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 4 08:14:43 CDT 2007


Module: wine
Branch: master
Commit: ea34c87cc3f9002ad2d87a339ffddcc61cbdfe49
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ea34c87cc3f9002ad2d87a339ffddcc61cbdfe49

Author: Jason Edmeades <jason.edmeades at googlemail.com>
Date:   Sun Jun  3 22:07:46 2007 +0100

xcopy.exe: Convert from main to wmain.

---

 programs/xcopy/Makefile.in |    2 +-
 programs/xcopy/xcopy.c     |    6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/programs/xcopy/Makefile.in b/programs/xcopy/Makefile.in
index 15079f0..f1fe31b 100644
--- a/programs/xcopy/Makefile.in
+++ b/programs/xcopy/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = xcopy.exe
-APPMODE   = -mconsole
+APPMODE   = -mconsole -municode
 IMPORTS   = shell32 user32 msvcrt kernel32
 EXTRADEFS = -DUNICODE
 EXTRAINCL = -I$(TOPSRCDIR)/include/msvcrt
diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c
index 8dd20d9..a88a0ad 100644
--- a/programs/xcopy/xcopy.c
+++ b/programs/xcopy/xcopy.c
@@ -93,7 +93,7 @@ static WCHAR copyTo[MAX_PATH];
 
      Processes the args, and drives the actual copying
    ========================================================================= */
-int main (int argc, char *argv[])
+int wmain (int argc, WCHAR *argvW[])
 {
     int     rc = 0;
     WCHAR   suppliedsource[MAX_PATH] = {0};   /* As supplied on the cmd line */
@@ -104,7 +104,6 @@ int main (int argc, char *argv[])
     WCHAR   destinationspec[MAX_PATH] = {0};  /* Filespec of destination */
     WCHAR   copyCmd[MAXSTRING];               /* COPYCMD env var         */
     DWORD   flags = 0;                        /* Option flags            */
-    LPWSTR *argvW = NULL;
     const WCHAR PROMPTSTR1[]  = {'/', 'Y', 0};
     const WCHAR PROMPTSTR2[]  = {'/', 'y', 0};
     const WCHAR COPYCMD[]  = {'C', 'O', 'P', 'Y', 'C', 'M', 'D', 0};
@@ -114,9 +113,6 @@ int main (int argc, char *argv[])
      * Parse the command line
      */
 
-    /* overwrite the command line */
-    argvW = CommandLineToArgvW( GetCommandLineW(), &argc );
-
     /* Confirm at least one parameter */
     if (argc < 2) {
         XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARMS));




More information about the wine-cvs mailing list